Spaces:
Runtime error
Runtime error
File size: 329 Bytes
e7e14eb d222319 e7e14eb d222319 |
1 2 3 4 5 6 7 8 9 10 |
import gradio as gr
import requests
import os
def api_call(query):
# Make the API call and retrieve the response
response = requests.post(os.environ["ENDPOINT_URL"], json={"query": query})
return response.json()["result"]
gr.Interface(fn=api_call, inputs="text", outputs="markdown", allow_flagging="never").launch() |