Enhance Gradio interface for ammonia status display
Browse files- Updated the Gradio interface to load the display_message function dynamically, improving the status display mechanism.
- Changed the launch configuration to show the API in the demo.
- Specified a minimum version requirement for Gradio in requirements.txt.
- app.py +3 -2
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -5,6 +5,7 @@ def display_message():
|
|
| 5 |
|
| 6 |
with gr.Blocks() as demo:
|
| 7 |
gr.Markdown("# アンモニア態窒素ステータス")
|
| 8 |
-
output_text = gr.Textbox(label="ステータス",
|
|
|
|
| 9 |
|
| 10 |
-
demo.launch(
|
|
|
|
| 5 |
|
| 6 |
with gr.Blocks() as demo:
|
| 7 |
gr.Markdown("# アンモニア態窒素ステータス")
|
| 8 |
+
output_text = gr.Textbox(label="ステータス", interactive=False)
|
| 9 |
+
demo.load(fn=display_message, inputs=None, outputs=output_text, api_name="status")
|
| 10 |
|
| 11 |
+
demo.launch(show_api=True)
|
requirements.txt
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
gradio[mcp]
|
| 2 |
supabase
|
| 3 |
numpy
|
|
|
|
| 4 |
python-dotenv
|
|
|
|
| 1 |
gradio[mcp]
|
| 2 |
supabase
|
| 3 |
numpy
|
| 4 |
+
gradio>=4.0.0
|
| 5 |
python-dotenv
|