Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,11 +15,13 @@ import argparse
|
|
15 |
import gradio as gr
|
16 |
from timeit import default_timer as timer
|
17 |
import torch
|
|
|
18 |
import numpy as np
|
19 |
import pandas as pd
|
20 |
import whisper
|
21 |
|
22 |
|
|
|
23 |
whisper_model = whisper.load_model("medium").to("cuda")
|
24 |
tts_model = VitsModel.from_pretrained("facebook/mms-tts-pol")
|
25 |
tts_model.to("cuda")
|
@@ -41,7 +43,6 @@ def read_txt():
|
|
41 |
##### Chat z LLAMA ####
|
42 |
##### Chat z LLAMA ####
|
43 |
|
44 |
-
|
45 |
def _load_model_tokenizer():
|
46 |
model_id = 'tangger/Qwen-7B-Chat'
|
47 |
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|
|
|
15 |
import gradio as gr
|
16 |
from timeit import default_timer as timer
|
17 |
import torch
|
18 |
+
import spaces
|
19 |
import numpy as np
|
20 |
import pandas as pd
|
21 |
import whisper
|
22 |
|
23 |
|
24 |
+
@spaces.GPU
|
25 |
whisper_model = whisper.load_model("medium").to("cuda")
|
26 |
tts_model = VitsModel.from_pretrained("facebook/mms-tts-pol")
|
27 |
tts_model.to("cuda")
|
|
|
43 |
##### Chat z LLAMA ####
|
44 |
##### Chat z LLAMA ####
|
45 |
|
|
|
46 |
def _load_model_tokenizer():
|
47 |
model_id = 'tangger/Qwen-7B-Chat'
|
48 |
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|