Spaces:
Running
Running
changes
Browse files
app.py
CHANGED
|
@@ -85,6 +85,7 @@ def synthesize(article_url,progress_audio=gr.Progress()):
|
|
| 85 |
temperature=0.9,
|
| 86 |
eos_token_id=terminators,
|
| 87 |
)
|
|
|
|
| 88 |
t = Thread(target=model.generate, kwargs=generate_kwargs)
|
| 89 |
t.start()
|
| 90 |
|
|
@@ -103,10 +104,12 @@ def synthesize(article_url,progress_audio=gr.Progress()):
|
|
| 103 |
# print("API Call Completed")
|
| 104 |
pattern = r"\{(?:[^{}]|(?:\{[^{}]*\}))*\}"
|
| 105 |
json_match = re.search(pattern, partial_text)
|
|
|
|
| 106 |
if json_match:
|
| 107 |
conversation=json_match.group()
|
| 108 |
else:
|
| 109 |
conversation = template
|
|
|
|
| 110 |
speed = 1.0
|
| 111 |
models = {"EN": TTS(language="EN", device=device)}
|
| 112 |
speakers = ["EN-Default", "EN-US"]
|
|
|
|
| 85 |
temperature=0.9,
|
| 86 |
eos_token_id=terminators,
|
| 87 |
)
|
| 88 |
+
print("Entered Generation")
|
| 89 |
t = Thread(target=model.generate, kwargs=generate_kwargs)
|
| 90 |
t.start()
|
| 91 |
|
|
|
|
| 104 |
# print("API Call Completed")
|
| 105 |
pattern = r"\{(?:[^{}]|(?:\{[^{}]*\}))*\}"
|
| 106 |
json_match = re.search(pattern, partial_text)
|
| 107 |
+
print("Exited Generation")
|
| 108 |
if json_match:
|
| 109 |
conversation=json_match.group()
|
| 110 |
else:
|
| 111 |
conversation = template
|
| 112 |
+
print(conversation)
|
| 113 |
speed = 1.0
|
| 114 |
models = {"EN": TTS(language="EN", device=device)}
|
| 115 |
speakers = ["EN-Default", "EN-US"]
|