Spaces:
Sleeping
Sleeping
Update server.py
Browse files
server.py
CHANGED
|
@@ -36,6 +36,10 @@ async def generate_quiz(chapter_name: str, difficulty: str = "medium") -> str:
|
|
| 36 |
return f"Material: {raw_data[:2000]}\nDifficulty: {difficulty}\nCreate a 3-question quiz."
|
| 37 |
|
| 38 |
if __name__ == "__main__":
|
| 39 |
-
#
|
| 40 |
-
#
|
| 41 |
-
mcp.run(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
return f"Material: {raw_data[:2000]}\nDifficulty: {difficulty}\nCreate a 3-question quiz."
|
| 37 |
|
| 38 |
if __name__ == "__main__":
|
| 39 |
+
# For Hugging Face Spaces, we use transport="sse" or "http"
|
| 40 |
+
# Port 7860 is the HF default
|
| 41 |
+
mcp.run(
|
| 42 |
+
transport="http",
|
| 43 |
+
port=7860,
|
| 44 |
+
host="0.0.0.0"
|
| 45 |
+
)
|