Spaces:
Sleeping
Sleeping
File size: 376 Bytes
d80ce47 7663944 9a0b4d4 d80ce47 7663944 d80ce47 7663944 e714af9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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) |