Skip to content
Discussion options

You must be logged in to vote

Well, it seems as the HF space starts but it dont know how to go forward from there. To tackle that problem u can check ur docker exposed port and startup.sh port for the FastAPI backend. Another thing is the main.py in the backend folder, locally it can deploy with no issues but on HF spaces it requires a special API to load the HTML page. It goes like

# Simple root endpoint - this is the key fix for HF Spaces "Starting" issue
@app.get("/", response_class=responses.HTMLResponse)
def root():
    return """
    <html>
        <head>
            <title>Socrates RAG Backend</title>
            <style>
                body { font-family: system-ui, sans-serif; margin: 40px; background: #f9f9f…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Saadajee420
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Codespaces Your development environment, in the cloud. Run VS Code and code on GitHub's cloud platform, Question Ask and answer questions about GitHub features and usage
2 participants