Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
from llama_cpp import Llama
|
3 |
from huggingface_hub import hf_hub_download
|
@@ -35,6 +36,7 @@ def user(user_message, history):
|
|
35 |
history = []
|
36 |
return "", history + [{"role": "user", "content": user_message}]
|
37 |
|
|
|
38 |
def bot(history):
|
39 |
"""Generate and stream the bot's response."""
|
40 |
if not history:
|
|
|
1 |
+
import spaces
|
2 |
import gradio as gr
|
3 |
from llama_cpp import Llama
|
4 |
from huggingface_hub import hf_hub_download
|
|
|
36 |
history = []
|
37 |
return "", history + [{"role": "user", "content": user_message}]
|
38 |
|
39 |
+
@spaces.GPU
|
40 |
def bot(history):
|
41 |
"""Generate and stream the bot's response."""
|
42 |
if not history:
|