Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- ui/gradio_app.py +3 -2
ui/gradio_app.py
CHANGED
|
@@ -37,7 +37,7 @@ def add_to_dex(
|
|
| 37 |
def build_app() -> gr.Blocks:
|
| 38 |
"""Build the Gradio interface for Hugging Face Spaces."""
|
| 39 |
theme = gr.themes.Soft(primary_hue="green", secondary_hue="emerald")
|
| 40 |
-
with gr.Blocks(
|
| 41 |
current_mushroom = gr.State(None)
|
| 42 |
collection = gr.State([])
|
| 43 |
|
|
@@ -55,7 +55,7 @@ def build_app() -> gr.Blocks:
|
|
| 55 |
explore_button = gr.Button("Explore", variant="primary")
|
| 56 |
add_button = gr.Button("Add to MycoDex")
|
| 57 |
with gr.Column(scale=3):
|
| 58 |
-
chat = gr.Chatbot(value=welcome_history(), label="Myco Chat",
|
| 59 |
with gr.Row():
|
| 60 |
prompt = gr.Textbox(
|
| 61 |
label="Ask Myco",
|
|
@@ -75,4 +75,5 @@ def build_app() -> gr.Blocks:
|
|
| 75 |
prompt.submit(ask_myco, inputs=[prompt, chat, current_mushroom], outputs=[prompt, chat])
|
| 76 |
add_button.click(add_to_dex, inputs=[current_mushroom, collection, chat], outputs=[collection, dex, chat])
|
| 77 |
|
|
|
|
| 78 |
return demo
|
|
|
|
| 37 |
def build_app() -> gr.Blocks:
|
| 38 |
"""Build the Gradio interface for Hugging Face Spaces."""
|
| 39 |
theme = gr.themes.Soft(primary_hue="green", secondary_hue="emerald")
|
| 40 |
+
with gr.Blocks(title="Myco") as demo:
|
| 41 |
current_mushroom = gr.State(None)
|
| 42 |
collection = gr.State([])
|
| 43 |
|
|
|
|
| 55 |
explore_button = gr.Button("Explore", variant="primary")
|
| 56 |
add_button = gr.Button("Add to MycoDex")
|
| 57 |
with gr.Column(scale=3):
|
| 58 |
+
chat = gr.Chatbot(value=welcome_history(), label="Myco Chat", height=360)
|
| 59 |
with gr.Row():
|
| 60 |
prompt = gr.Textbox(
|
| 61 |
label="Ask Myco",
|
|
|
|
| 75 |
prompt.submit(ask_myco, inputs=[prompt, chat, current_mushroom], outputs=[prompt, chat])
|
| 76 |
add_button.click(add_to_dex, inputs=[current_mushroom, collection, chat], outputs=[collection, dex, chat])
|
| 77 |
|
| 78 |
+
demo._theme = theme
|
| 79 |
return demo
|