Spaces:
Sleeping
Sleeping
Commit
•
ab19b96
1
Parent(s):
5992448
add ngrok
Browse files
app.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
def greet(
|
4 |
-
|
|
|
5 |
|
6 |
-
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
7 |
iface.launch()
|
8 |
|
|
|
1 |
import gradio as gr
|
2 |
+
import requests
|
3 |
|
4 |
+
def greet(url, query):
|
5 |
+
response = requests.get(f"{url}generate?query={query}")
|
6 |
+
return str(response.text)
|
7 |
|
8 |
+
iface = gr.Interface(fn=greet, inputs=["text","text"], outputs="text")
|
9 |
iface.launch()
|
10 |
|