Spaces:
Runtime error
Runtime error
update with baixing api
Browse files
app.py
CHANGED
@@ -1,7 +1,12 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
5 |
|
6 |
iface = gr.Interface(fn=chat,
|
7 |
inputs=["text", "text", "text"],
|
|
|
1 |
import gradio as gr
|
2 |
+
import requests
|
3 |
|
4 |
+
key = os.getenv("baixing_key")
|
5 |
+
url = "https://gpt.baixing.com/"
|
6 |
+
|
7 |
+
def chat(p, qid, uid):
|
8 |
+
result = requests.get(url, params={"p": p, "k": key}).json()['data']
|
9 |
+
return ["text", result]
|
10 |
|
11 |
iface = gr.Interface(fn=chat,
|
12 |
inputs=["text", "text", "text"],
|