Spaces:
Sleeping
Sleeping
Commit
·
9ba3bfc
1
Parent(s):
3482c4c
get rid of useless buttons/panels, fix dotenv bug, update gradio vers
Browse files- README.md +1 -1
- app.py +16 -16
- requirements.txt +1 -0
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 🏢
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version: 4.
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
|
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 4.40.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
app.py
CHANGED
|
@@ -125,7 +125,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 125 |
typical_responses.append(btn)
|
| 126 |
|
| 127 |
|
| 128 |
-
with gr.Column(elem_id="audio-group", scale=1):
|
| 129 |
# songwriter_creativity = gr.Slider(label="Songwriter LLM Temperature", minimum=0, maximum=1, step=0.01, value=1)
|
| 130 |
|
| 131 |
with gr.Group():
|
|
@@ -247,26 +247,26 @@ with gr.Blocks(css=css) as demo:
|
|
| 247 |
make_modal_visible, [tutorial_step], [tutorial_step, modal, modal_1, modal_2]
|
| 248 |
)
|
| 249 |
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
|
| 262 |
-
|
| 263 |
|
| 264 |
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
|
| 269 |
-
|
| 270 |
|
| 271 |
|
| 272 |
# with gr.Row():
|
|
|
|
| 125 |
typical_responses.append(btn)
|
| 126 |
|
| 127 |
|
| 128 |
+
with gr.Column(elem_id="audio-group", scale=1, visible=False):
|
| 129 |
# songwriter_creativity = gr.Slider(label="Songwriter LLM Temperature", minimum=0, maximum=1, step=0.01, value=1)
|
| 130 |
|
| 131 |
with gr.Group():
|
|
|
|
| 247 |
make_modal_visible, [tutorial_step], [tutorial_step, modal, modal_1, modal_2]
|
| 248 |
)
|
| 249 |
|
| 250 |
+
with gr.Row(visible=False):
|
| 251 |
+
# get_snippet_button = gr.Button("Get Audio Snippet", scale=2)
|
| 252 |
+
done = gr.Button("Finish Full Song 🎶", scale=4)
|
| 253 |
+
#autoGPT_checkbox = gr.Checkbox(label="AutoGPT", value=True, info="Auto-generate responses from journal entry", interactive=True, scale=2)
|
| 254 |
+
#journal_llm_creativity = gr.Slider(label="Journal LLM Temperature", minimum=0, maximum=1, step=0.01, value=1, interactive=True, scale=2)
|
| 255 |
+
reset_button = gr.Button("Reset", scale=2)
|
| 256 |
|
| 257 |
+
def reset_chat(messages, chatbot_history):
|
| 258 |
+
messages = messages[:2]
|
| 259 |
+
chatbot_history = messages_to_history(messages[:2])
|
| 260 |
+
return messages, chatbot_history, '', '', '', '', gr.HTML('<center>generating...</center>'), [], []
|
| 261 |
|
| 262 |
+
reset_button.click(reset_chat, inputs=[messages, chatbot_history], outputs=[messages, chatbot_history, current_section, current_lyrics, curr_tags, clip_to_continue, curr_audio, generated_audios, button_options])
|
| 263 |
|
| 264 |
|
| 265 |
+
done.click(set_finish_query, inputs=[textbox], outputs=[textbox]).then(model_chat,
|
| 266 |
+
inputs=[genre_input, textbox, chatbot_history, messages, generated_audios],
|
| 267 |
+
outputs=[textbox, chatbot_history, messages, current_section, current_lyrics, curr_tags, clip_to_continue, curr_audio, generated_audios, button_options])
|
| 268 |
|
| 269 |
+
demo.load(reset_chat, inputs=[messages, chatbot_history], outputs=[messages, chatbot_history, current_section, current_lyrics, curr_tags, clip_to_continue, curr_audio, generated_audios])
|
| 270 |
|
| 271 |
|
| 272 |
# with gr.Row():
|
requirements.txt
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
setuptools
|
| 2 |
wheel
|
|
|
|
| 3 |
|
| 4 |
pydub==0.25.1
|
| 5 |
scipy==1.12.0
|
|
|
|
| 1 |
setuptools
|
| 2 |
wheel
|
| 3 |
+
dotenv
|
| 4 |
|
| 5 |
pydub==0.25.1
|
| 6 |
scipy==1.12.0
|