merve HF Staff commited on
Commit
b07260d
·
verified ·
1 Parent(s): fd277fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -5,6 +5,7 @@ import requests
5
  import torch
6
  import gradio as gr
7
  import re
 
8
 
9
  model_id = "meta-llama/Llama-Guard-4-12B"
10
 
@@ -31,6 +32,7 @@ labels_dict = {
31
  "S13": "Elections",
32
  }
33
 
 
34
  def infer(image, text_input, model_output, exclude_categories):
35
  if image is None and text_input:
36
  messages = [
 
5
  import torch
6
  import gradio as gr
7
  import re
8
+ import spaces
9
 
10
  model_id = "meta-llama/Llama-Guard-4-12B"
11
 
 
32
  "S13": "Elections",
33
  }
34
 
35
+ @spaces.GPU
36
  def infer(image, text_input, model_output, exclude_categories):
37
  if image is None and text_input:
38
  messages = [