Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -471,9 +471,20 @@ def app():
|
|
| 471 |
)
|
| 472 |
|
| 473 |
return interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 474 |
|
| 475 |
-
if __name__ == "__main__":
|
| 476 |
-
app
|
| 477 |
|
| 478 |
|
| 479 |
|
|
|
|
| 471 |
)
|
| 472 |
|
| 473 |
return interface
|
| 474 |
+
import gradio as gr
|
| 475 |
+
|
| 476 |
+
def sample_function(input_text):
|
| 477 |
+
return f"Processed: {input_text}"
|
| 478 |
+
|
| 479 |
+
with gr.Blocks() as app:
|
| 480 |
+
gr.Markdown("## My Gradio App")
|
| 481 |
+
input_box = gr.Textbox(label="Enter something")
|
| 482 |
+
output_box = gr.Textbox(label="Output")
|
| 483 |
+
button = gr.Button("Submit")
|
| 484 |
+
button.click(sample_function, inputs=input_box, outputs=output_box)
|
| 485 |
|
| 486 |
+
if __name__ == "__main__":
|
| 487 |
+
app.launch(server_name="0.0.0.0", server_port=7860, share=True)
|
| 488 |
|
| 489 |
|
| 490 |
|