Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def save_set(model,length,noise,width,sen_pause):
|
|
27 |
with open(f'{os.getcwd()}/saved/{file_name}.json','w') as file:
|
28 |
file.write(json.dumps(set_json,indent=4))
|
29 |
file.close()
|
30 |
-
return(f'{file_name}.json')
|
31 |
def load_set(set_file):
|
32 |
with open(set_file,'r') as file:
|
33 |
set_json=json.loads(file.read())
|
@@ -54,10 +54,10 @@ with gr.Blocks() as b:
|
|
54 |
|
55 |
with gr.Column(scale=1):
|
56 |
with gr.Accordion("Control"):
|
57 |
-
length=gr.Slider(label="Length", minimum=0.01, maximum=
|
58 |
noise=gr.Slider(label="Noise", minimum=0.01, maximum=3.0, value=0.1)
|
59 |
-
width=gr.Slider(label="Noise Width", minimum=0.01, maximum=
|
60 |
-
sen_pause=gr.Slider(label="Sentence Pause", minimum=0.1, maximum=
|
61 |
with gr.Tab("Save Settings"):
|
62 |
save_file=gr.File()
|
63 |
save_btn=gr.Button("Save")
|
|
|
27 |
with open(f'{os.getcwd()}/saved/{file_name}.json','w') as file:
|
28 |
file.write(json.dumps(set_json,indent=4))
|
29 |
file.close()
|
30 |
+
return(f'{os.getcwd()}/saved/{file_name}.json')
|
31 |
def load_set(set_file):
|
32 |
with open(set_file,'r') as file:
|
33 |
set_json=json.loads(file.read())
|
|
|
54 |
|
55 |
with gr.Column(scale=1):
|
56 |
with gr.Accordion("Control"):
|
57 |
+
length=gr.Slider(label="Length", minimum=0.01, maximum=10.0, value=1.2)
|
58 |
noise=gr.Slider(label="Noise", minimum=0.01, maximum=3.0, value=0.1)
|
59 |
+
width=gr.Slider(label="Noise Width", minimum=0.01, maximum=3.0, value=0.3)
|
60 |
+
sen_pause=gr.Slider(label="Sentence Pause", minimum=0.1, maximum=10.0, value=2)
|
61 |
with gr.Tab("Save Settings"):
|
62 |
save_file=gr.File()
|
63 |
save_btn=gr.Button("Save")
|