Dane Summers commited on
Commit
063df12
·
1 Parent(s): 595ac61

aider: Added hello world Gradio app in `app.py`.

Browse files

# Aider chat conversation:

USER: Make a hello world Gradio app in `app.py`

ASSISTANT: Sure, I will create a simple Gradio app that displays "Hello, World!" when run.

Here is the code:

```python
app.py
<<<<<<< HEAD

=======
import gradio as gr

def greet():
return "Hello, World!"

iface = gr.Interface(fn=greet, inputs=[], outputs="text")
iface.launch()
>>>>>>> updated
```

This code creates a Gradio interface with no inputs and a text output. The function `greet` returns the string "Hello, World!". The interface is then launched with `iface.launch()`. When you run this script, it will start a web server and print a URL you can visit in your web browser to interact with the app.

Files changed (1) hide show
  1. app.py +7 -0
app.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def greet():
4
+ return "Hello, World!"
5
+
6
+ iface = gr.Interface(fn=greet, inputs=[], outputs="text")
7
+ iface.launch()