MukulRay commited on
Commit
3d55aee
·
1 Parent(s): 83be4a1

Pin fastapi==0.115.5 and starlette==0.41.3: starlette 1.0 broke gradio 4.44.1 TemplateResponse signature

Browse files
Files changed (1) hide show
  1. requirements.txt +8 -0
requirements.txt CHANGED
@@ -18,6 +18,14 @@ huggingface_hub>=0.30,<1.0
18
  # time the API info endpoint is hit. Pinning to 2.10.6 keeps schemas as dicts.
19
  pydantic==2.10.6
20
 
 
 
 
 
 
 
 
 
21
  # Hybrid route classifier (TF-IDF + logistic regression).
22
  # Loose lower bounds so the resolver picks wheels compatible with the
23
  # Python version configured in the README YAML (currently 3.10).
 
18
  # time the API info endpoint is hit. Pinning to 2.10.6 keeps schemas as dicts.
19
  pydantic==2.10.6
20
 
21
+ # Starlette 1.0 dropped the old `TemplateResponse(name, context)` positional
22
+ # signature in favor of `TemplateResponse(request, name, context)`. Gradio
23
+ # 4.44.1 still calls the old signature, so the context dict gets passed as
24
+ # the template name and jinja2 raises "unhashable type: 'dict'". Pin both
25
+ # fastapi and starlette to versions matching what gradio 4.44.1 was tested on.
26
+ fastapi==0.115.5
27
+ starlette==0.41.3
28
+
29
  # Hybrid route classifier (TF-IDF + logistic regression).
30
  # Loose lower bounds so the resolver picks wheels compatible with the
31
  # Python version configured in the README YAML (currently 3.10).