Spaces:
Runtime error
Runtime error
import gradio as gr | |
import io | |
import requests | |
key = os.getenv("baixing_key") | |
url = "https://gpt.baixing.com/" | |
def chat(p, qid, uid): | |
result = requests.get(url, params={"p": p, "k": key}).json()['data'] | |
return ["text", result] | |
iface = gr.Interface(fn=chat, | |
inputs=["text", "text", "text"], | |
outputs=["text", "text"]) | |
iface.launch() |