Spaces:
Build error
Build error
| import gradio as gr | |
| import requests | |
| endpoint_url = "https://a3l35k201hmk0kld.us-east-1.aws.endpoints.huggingface.cloud" | |
| def predict(question): | |
| response = requests.get(endpoint_url, params={"question": question}) | |
| return response.json()["answer"][0] | |
| demo = gr.Interface(fn=predict, inputs="text", outputs="text") | |
| demo.launch() | |