Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
import argparse
|
2 |
import os
|
3 |
-
import spaces
|
4 |
|
5 |
|
6 |
#hack install gradio
|
7 |
os.system("pip uninstall -y gradio")
|
8 |
-
os.system("pip install gradio==
|
9 |
import gradio as gr
|
10 |
|
11 |
import json
|
@@ -23,7 +23,7 @@ def parse_args():
|
|
23 |
parser.add_argument("--n_gpus", type=int, default=1) # n_gpu
|
24 |
return parser.parse_args()
|
25 |
|
26 |
-
|
27 |
def predict(message, history, system_prompt, temperature, max_tokens):
|
28 |
global model, tokenizer, device
|
29 |
instruction = "<|im_start|>system\nA chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n<|im_end|>\n"
|
|
|
1 |
import argparse
|
2 |
import os
|
3 |
+
#import spaces
|
4 |
|
5 |
|
6 |
#hack install gradio
|
7 |
os.system("pip uninstall -y gradio")
|
8 |
+
os.system("pip install gradio==3.50.2")
|
9 |
import gradio as gr
|
10 |
|
11 |
import json
|
|
|
23 |
parser.add_argument("--n_gpus", type=int, default=1) # n_gpu
|
24 |
return parser.parse_args()
|
25 |
|
26 |
+
#@spaces.GPU()
|
27 |
def predict(message, history, system_prompt, temperature, max_tokens):
|
28 |
global model, tokenizer, device
|
29 |
instruction = "<|im_start|>system\nA chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n<|im_end|>\n"
|