Rejekts commited on
Commit
ecadfa8
1 Parent(s): 6835793

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -147,12 +147,15 @@ def update_audio_player(choice):
147
 
148
  with gr.Blocks() as app:
149
  with gr.Row():
150
- gr.HTML("")
 
 
 
151
  with gr.Row():
152
  with gr.Column():
153
  with gr.Tabs():
154
  with gr.TabItem("1.Choose a voice model:"):
155
- model_picker = gr.Dropdown(label="Model: ",choices=show_available('assets/weights','.pth'),value=show_available('assets/weights','.pth')[0],interactive=True,placeholder="Choose a VOICE MODEL here")
156
  index_picker = gr.Dropdown(label="Index:",interactive=True,choices=show_available('logs'),value=show_available('logs')[0],allow_custom_value=True)
157
  with gr.TabItem("(Or download a model here)"):
158
  with gr.Row():
@@ -173,7 +176,7 @@ with gr.Blocks() as app:
173
  audio_picker = gr.Dropdown(label="",choices=show_available('audios'),value='',interactive=True)
174
  recorder.stop_recording(upload_file, inputs=[recorder],outputs=[audio_picker])
175
  with gr.TabItem("(Or upload a new file here)"):
176
- dropbox = gr.Audio(label="Drop an audio here.",sources=['upload'], type="filepath")
177
  dropbox.upload(fn=upload_file, inputs=[dropbox],outputs=[audio_picker])
178
  audio_refresher = gr.Button("Refresh")
179
  audio_refresher.click(fn=refresh,inputs=[],outputs=[audio_picker,model_picker,index_picker])
 
147
 
148
  with gr.Blocks() as app:
149
  with gr.Row():
150
+ with gr.Column():
151
+ gr.HTML("<img src='file/a.png' alt='easy logo'>")
152
+ with gr.Column():
153
+ gr.HTML("<a href='https://ko-fi.com/rejekts' target='_blank'><img src='file/paypal_button.png' alt='donation button'></a>")
154
  with gr.Row():
155
  with gr.Column():
156
  with gr.Tabs():
157
  with gr.TabItem("1.Choose a voice model:"):
158
+ model_picker = gr.Dropdown(label="Model: ",choices=show_available('assets/weights','.pth'),value=show_available('assets/weights','.pth')[0],interactive=True)
159
  index_picker = gr.Dropdown(label="Index:",interactive=True,choices=show_available('logs'),value=show_available('logs')[0],allow_custom_value=True)
160
  with gr.TabItem("(Or download a model here)"):
161
  with gr.Row():
 
176
  audio_picker = gr.Dropdown(label="",choices=show_available('audios'),value='',interactive=True)
177
  recorder.stop_recording(upload_file, inputs=[recorder],outputs=[audio_picker])
178
  with gr.TabItem("(Or upload a new file here)"):
179
+ dropbox = gr.File(label="Drop an audio here.",file_types=['.wav', '.mp3', '.ogg', '.flac', '.aac'], type="file")
180
  dropbox.upload(fn=upload_file, inputs=[dropbox],outputs=[audio_picker])
181
  audio_refresher = gr.Button("Refresh")
182
  audio_refresher.click(fn=refresh,inputs=[],outputs=[audio_picker,model_picker,index_picker])