Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,11 +27,10 @@ import whisper
|
|
27 |
# print("TTS Loaded!")
|
28 |
|
29 |
|
30 |
-
@spaces.GPU
|
31 |
def load_whisper():
|
32 |
return whisper.load_model("medium").to("cuda")
|
33 |
|
34 |
-
|
35 |
def load_tts():
|
36 |
tts_model = VitsModel.from_pretrained("facebook/mms-tts-pol")
|
37 |
tts_model.to("cuda")
|
@@ -49,10 +48,6 @@ def read_txt():
|
|
49 |
return lines
|
50 |
|
51 |
|
52 |
-
##### Chat z LLAMA ####
|
53 |
-
##### Chat z LLAMA ####
|
54 |
-
##### Chat z LLAMA ####
|
55 |
-
@spaces.GPU
|
56 |
def _load_model_tokenizer():
|
57 |
model_id = 'tangger/Qwen-7B-Chat'
|
58 |
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|
@@ -167,6 +162,7 @@ def regenerate(_chatbot, _task_history):
|
|
167 |
_chatbot.pop(-1)
|
168 |
yield from predict(item[0], _chatbot, _task_history)
|
169 |
|
|
|
170 |
with gr.Blocks() as chat_demo:
|
171 |
chatbot = gr.Chatbot(label='Llama Voice Chatbot', elem_classes="control-height")
|
172 |
query = gr.Textbox(lines=2, label='Input')
|
|
|
27 |
# print("TTS Loaded!")
|
28 |
|
29 |
|
|
|
30 |
def load_whisper():
|
31 |
return whisper.load_model("medium").to("cuda")
|
32 |
|
33 |
+
|
34 |
def load_tts():
|
35 |
tts_model = VitsModel.from_pretrained("facebook/mms-tts-pol")
|
36 |
tts_model.to("cuda")
|
|
|
48 |
return lines
|
49 |
|
50 |
|
|
|
|
|
|
|
|
|
51 |
def _load_model_tokenizer():
|
52 |
model_id = 'tangger/Qwen-7B-Chat'
|
53 |
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|
|
|
162 |
_chatbot.pop(-1)
|
163 |
yield from predict(item[0], _chatbot, _task_history)
|
164 |
|
165 |
+
@spaces.GPU
|
166 |
with gr.Blocks() as chat_demo:
|
167 |
chatbot = gr.Chatbot(label='Llama Voice Chatbot', elem_classes="control-height")
|
168 |
query = gr.Textbox(lines=2, label='Input')
|