Spaces:
Configuration error
Configuration error
File size: 412 Bytes
ecaa7fc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import requests
import gradio as gr
API_URL = "http://127.0.0.1:3000/api/v1/prediction/465ade9f-1cd7-409d-8146-424bceb1bb39"
def query(quest):
response = requests.post(API_URL, json={"question":quest,})
return response.json()
# output = query({
# "question": "What this script about?",
# })
interface = gr.Interface(
fn=query,
inputs="text",
outputs="text",
)
interface.launch() |