prthm11 commited on
Commit
e7f94e7
·
verified ·
1 Parent(s): 0bf2e31

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +7 -3
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
- # Change stdio to sse for Hugging Face deployment
40
- # HF Spaces listen on port 7860 by default
41
- mcp.run(transport="http", host="0.0.0.0", port=7860)
 
 
 
 
 
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
+ )