gradio trial
Browse files
app.py
CHANGED
|
@@ -3,13 +3,10 @@ import gradio as gr
|
|
| 3 |
def greet(input_text):
|
| 4 |
return f"Hello, {input_text}!"
|
| 5 |
|
| 6 |
-
|
| 7 |
fn=greet,
|
| 8 |
inputs=gr.Textbox(label="Enter text"),
|
| 9 |
outputs="text",
|
| 10 |
title="Simple Greeting App",
|
| 11 |
description="Type something and see the response."
|
| 12 |
-
)
|
| 13 |
-
|
| 14 |
-
if __name__ == "__main__":
|
| 15 |
-
demo.launch()
|
|
|
|
| 3 |
def greet(input_text):
|
| 4 |
return f"Hello, {input_text}!"
|
| 5 |
|
| 6 |
+
app = gr.Interface(
|
| 7 |
fn=greet,
|
| 8 |
inputs=gr.Textbox(label="Enter text"),
|
| 9 |
outputs="text",
|
| 10 |
title="Simple Greeting App",
|
| 11 |
description="Type something and see the response."
|
| 12 |
+
).launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
|
|
|
|
|