Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- api/main.py +8 -0
- frontend/index.html +1 -1
api/main.py
CHANGED
|
@@ -176,6 +176,14 @@ def health():
|
|
| 176 |
}
|
| 177 |
|
| 178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
@app.post("/query", response_model=QueryResponse)
|
| 180 |
def query(request: QueryRequest, background_tasks: BackgroundTasks):
|
| 181 |
if not request.query.strip():
|
|
|
|
| 176 |
}
|
| 177 |
|
| 178 |
|
| 179 |
+
@app.get("/court/ui")
|
| 180 |
+
def serve_moot_court():
|
| 181 |
+
"""Serve the Moot Court UI directly"""
|
| 182 |
+
if os.path.exists("frontend/court/court.html"):
|
| 183 |
+
return FileResponse("frontend/court/court.html", media_type="text/html")
|
| 184 |
+
return {"error": "Moot Court UI not found"}
|
| 185 |
+
|
| 186 |
+
|
| 187 |
@app.post("/query", response_model=QueryResponse)
|
| 188 |
def query(request: QueryRequest, background_tasks: BackgroundTasks):
|
| 189 |
if not request.query.strip():
|
frontend/index.html
CHANGED
|
@@ -32,7 +32,7 @@
|
|
| 32 |
System Analytics
|
| 33 |
</button>
|
| 34 |
|
| 35 |
-
<a href="/
|
| 36 |
<span class="analytics-icon">⚖️</span>
|
| 37 |
Moot Court
|
| 38 |
</a>
|
|
|
|
| 32 |
System Analytics
|
| 33 |
</button>
|
| 34 |
|
| 35 |
+
<a href="/court/ui" class="analytics-btn" style="text-decoration: none; color: inherit;">
|
| 36 |
<span class="analytics-icon">⚖️</span>
|
| 37 |
Moot Court
|
| 38 |
</a>
|