Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,7 @@ from datetime import datetime, timedelta
|
|
10 |
from threading import Thread
|
11 |
|
12 |
import gradio as gr
|
|
|
13 |
import numpy as np
|
14 |
from PIL import Image
|
15 |
from huggingface_hub import hf_hub_download
|
@@ -94,7 +95,7 @@ llm = LLM(model=MODEL_ID, tokenizer_mode="mistral")
|
|
94 |
# -----------------------------------------------------------------------------
|
95 |
# Main Generation Function
|
96 |
# -----------------------------------------------------------------------------
|
97 |
-
|
98 |
def generate(
|
99 |
input_dict: dict,
|
100 |
chat_history: list,
|
|
|
10 |
from threading import Thread
|
11 |
|
12 |
import gradio as gr
|
13 |
+
import spaces
|
14 |
import numpy as np
|
15 |
from PIL import Image
|
16 |
from huggingface_hub import hf_hub_download
|
|
|
95 |
# -----------------------------------------------------------------------------
|
96 |
# Main Generation Function
|
97 |
# -----------------------------------------------------------------------------
|
98 |
+
@spaces.GPU
|
99 |
def generate(
|
100 |
input_dict: dict,
|
101 |
chat_history: list,
|