Spaces:
Runtime error
Runtime error
Download app.py from RamshaAnwar/contextquery-api: direct link, hf CLI and curl.
- Browser
- Download file 356 Bytes
-
https://huggingface.co/spaces/RamshaAnwar/contextquery-api/resolve/main/app.py
- Command line
-
hf download hf://spaces/RamshaAnwar/contextquery-api/app.py
-
curl -L -o app.py https://huggingface.co/spaces/RamshaAnwar/contextquery-api/resolve/main/app.py
356 Bytes
| import gradio as gr | |
| from app.main import app as fastapi_app | |
| # Create a dummy UI so Gradio has something to launch | |
| demo = gr.Interface( | |
| fn=lambda x: "ContextQuery API is running", | |
| inputs="text", | |
| outputs="text", | |
| title="ContextQuery AI Backend" | |
| ) | |
| # Mount the FastAPI app directly onto the Gradio app's server | |
| demo.app.mount("/", fastapi_app) |