Spaces:
Configuration error
Configuration error
| 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() |