Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -28,6 +28,7 @@ model = None
|
|
28 |
@spaces.GPU(duration=120)
|
29 |
def process_json_and_generate_audio(prompt_audio_role0_file, prompt_text_role0, prompt_audio_role1_file, prompt_text_role1, json_dialogue_input_str):
|
30 |
try:
|
|
|
31 |
if model is None:
|
32 |
model = Model()
|
33 |
model.generate_config.max_new_tokens = 50 * 50 # no more than 20s per turn
|
|
|
28 |
@spaces.GPU(duration=120)
|
29 |
def process_json_and_generate_audio(prompt_audio_role0_file, prompt_text_role0, prompt_audio_role1_file, prompt_text_role1, json_dialogue_input_str):
|
30 |
try:
|
31 |
+
global model
|
32 |
if model is None:
|
33 |
model = Model()
|
34 |
model.generate_config.max_new_tokens = 50 * 50 # no more than 20s per turn
|