Spaces:
Build error
Build error
Download app.py from AITECHPRODUCTS/llama-test: direct link, hf CLI and curl.
- Browser
- Download file 336 Bytes
-
https://huggingface.co/spaces/AITECHPRODUCTS/llama-test/resolve/main/app.py
- Command line
-
hf download hf://spaces/AITECHPRODUCTS/llama-test/app.py
-
curl -L -o app.py https://huggingface.co/spaces/AITECHPRODUCTS/llama-test/resolve/main/app.py
336 Bytes
| 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() | |