Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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 = [
|