Spaces:
Sleeping
Sleeping
Julian-Hans
commited on
Commit
•
88282b4
1
Parent(s):
c99fd10
port and server name added to config
Browse files
app.py
CHANGED
@@ -159,6 +159,6 @@ def gradio():
|
|
159 |
generate_button = gr.Button("Generate Music")
|
160 |
generate_button.click(fn=run_image_to_music, inputs=[image_input, llm_max_new_tokens, llm_temperature, llm_top_p, musicgen_max_seconds, local_captioning, local_llm, local_music_gen], outputs=[caption_output, music_description_output, music_output, durations])
|
161 |
# Launch Gradio app
|
162 |
-
demo.launch()
|
163 |
|
164 |
gradio()
|
|
|
159 |
generate_button = gr.Button("Generate Music")
|
160 |
generate_button.click(fn=run_image_to_music, inputs=[image_input, llm_max_new_tokens, llm_temperature, llm_top_p, musicgen_max_seconds, local_captioning, local_llm, local_music_gen], outputs=[caption_output, music_description_output, music_output, durations])
|
161 |
# Launch Gradio app
|
162 |
+
demo.launch(server_port=config.SERVICE_PORT, server_name=config.SERVER_NAME)
|
163 |
|
164 |
gradio()
|
config.py
CHANGED
@@ -3,6 +3,9 @@ import logging as log
|
|
3 |
|
4 |
log.basicConfig(level=log.INFO)
|
5 |
|
|
|
|
|
|
|
6 |
IMAGE_CAPTION_MODEL = "Salesforce/blip-image-captioning-large"
|
7 |
|
8 |
LLM_MODEL = "microsoft/Phi-3-mini-4k-instruct"
|
|
|
3 |
|
4 |
log.basicConfig(level=log.INFO)
|
5 |
|
6 |
+
SERVICE_PORT = 7860
|
7 |
+
SERVER_NAME = "0.0.0.0"
|
8 |
+
|
9 |
IMAGE_CAPTION_MODEL = "Salesforce/blip-image-captioning-large"
|
10 |
|
11 |
LLM_MODEL = "microsoft/Phi-3-mini-4k-instruct"
|