test / app.py
yousseftallal's picture
Replace with MultiQGen RAG question generator (FastAPI)
d544dca
Raw History Blame Contribute Delete
373 Bytes
"""
Hugging Face Spaces entry point.
Uses FastAPI + Uvicorn. If running locally with Flask preferred:
set MQG_BACKEND=flask
python -m multiq.cli serve
"""
import os
BACKEND = os.getenv("MQG_BACKEND", "fastapi")
if BACKEND == "flask":
from multiq.api import create_app as _create
app = _create()
else:
from multiq.fastapi_app import app # noqa: F401