Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import requests | |
| import os | |
| def gpt(prompt): | |
| baixing_gpt_key=os.environ.get("BAIXING_GPT_KEY") | |
| endpoint = "https://gpt.baixing.com/?p=%s&k=%s" % (prompt,baixing_gpt_key) | |
| response = requests.get(endpoint) | |
| output = response.json()['data'] | |
| return output | |
| iface = gr.Interface(fn=gpt,inputs="text", outputs="text") | |
| iface.launch(debug=True) |