Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,16 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
def greet(name):
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 7 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
def greet(name):
|
| 4 |
+
with open('database.csv','w') as file:
|
| 5 |
+
file.write(name + "\n")
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
with open('database.csv','r') as file:
|
| 9 |
+
a = file.read()
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
return "Hello " + a + "!!"
|
| 13 |
+
|
| 14 |
|
| 15 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 16 |
demo.launch()
|