Spaces:
Running
Running
clementruhm
commited on
Commit
•
0303990
1
Parent(s):
3e667ed
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ from typing import Dict
|
|
13 |
import gradio as gr
|
14 |
import soundfile as sf
|
15 |
|
16 |
-
from service_request import service_request
|
17 |
|
18 |
script_dir = os.path.dirname(os.path.abspath(__file__))
|
19 |
|
@@ -93,13 +93,11 @@ def main():
|
|
93 |
src_ = src_from_mic_
|
94 |
elif src_from_file_:
|
95 |
src_ = src_from_file_
|
96 |
-
elif src_text_:
|
97 |
-
src_ = src_text_
|
98 |
tgt_ = tgt_from_file_
|
99 |
if not src_ or not tgt_:
|
100 |
logging.warning("source or target are not provided")
|
101 |
return
|
102 |
-
return service_request(src_, tgt_, api_key_, api_secret_)
|
103 |
|
104 |
convert_btn.click(
|
105 |
speech_generation,
|
|
|
13 |
import gradio as gr
|
14 |
import soundfile as sf
|
15 |
|
16 |
+
from service_request import service_request
|
17 |
|
18 |
script_dir = os.path.dirname(os.path.abspath(__file__))
|
19 |
|
|
|
93 |
src_ = src_from_mic_
|
94 |
elif src_from_file_:
|
95 |
src_ = src_from_file_
|
|
|
|
|
96 |
tgt_ = tgt_from_file_
|
97 |
if not src_ or not tgt_:
|
98 |
logging.warning("source or target are not provided")
|
99 |
return
|
100 |
+
return service_request(src_text_, src_, tgt_, api_key_, api_secret_)
|
101 |
|
102 |
convert_btn.click(
|
103 |
speech_generation,
|