Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
|
| 2 |
import json
|
| 3 |
import torch
|
| 4 |
import gradio as gr
|
|
@@ -60,6 +60,7 @@ def build_prompt(task_instruction: str, format_instruction: str, tools: list, qu
|
|
| 60 |
prompt += build_conversation_history_prompt(conversation_history)
|
| 61 |
return prompt
|
| 62 |
|
|
|
|
| 63 |
def generate_response(tools_input, query):
|
| 64 |
try:
|
| 65 |
tools = json.loads(tools_input)
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
import json
|
| 3 |
import torch
|
| 4 |
import gradio as gr
|
|
|
|
| 60 |
prompt += build_conversation_history_prompt(conversation_history)
|
| 61 |
return prompt
|
| 62 |
|
| 63 |
+
@spaces.GPU
|
| 64 |
def generate_response(tools_input, query):
|
| 65 |
try:
|
| 66 |
tools = json.loads(tools_input)
|