Kashaf1 commited on
Commit
3bbb6e3
·
1 Parent(s): 0ea2135

Uploaded complete moirai_forecast_app contents

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. requirements.txt +31 -9
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 📈
4
  colorFrom: blue
5
  colorTo: indigo
6
  sdk: gradio
7
- sdk_version: "4.44.0"
8
  python_version: "3.11"
9
  app_file: app.py
10
  pinned: false
 
4
  colorFrom: blue
5
  colorTo: indigo
6
  sdk: gradio
7
+ sdk_version: "6.26.0"
8
  python_version: "3.11"
9
  app_file: app.py
10
  pinned: false
requirements.txt CHANGED
@@ -3,14 +3,16 @@ uni2ts>=2.0.0
3
  torch>=2.1
4
  gluonts>=0.14
5
 
6
- # Pinned explicitly: huggingface_hub 1.0+ removed the HfFolder class,
7
- # but gradio 4.44.x's oauth.py still does `from huggingface_hub import
8
- # HfFolder, whoami` unconditionally at import time -- so `import gradio`
9
- # crashes immediately on any resolution that picks huggingface_hub>=1.0.
10
- # uni2ts only floors huggingface_hub>=0.23.0 with no ceiling, so without
11
- # this pin pip is free to grab the latest 1.x. Confirmed against a real
12
- # Space's runtime traceback, not a guess.
13
- huggingface_hub>=0.23.0,<1.0
 
 
14
 
15
  # Data
16
  yfinance>=0.2.40
@@ -18,7 +20,27 @@ pandas>=2.0
18
  numpy>=1.24
19
 
20
  # UI (Hugging Face Spaces)
21
- gradio>=4.40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  python-dateutil
24
  pytz
 
3
  torch>=2.1
4
  gluonts>=0.14
5
 
6
+ # --- REVERSED after upgrading to gradio 6.26.0 ---
7
+ # This used to be pinned `<1.0`: gradio 4.44.x's oauth.py did
8
+ # `from huggingface_hub import HfFolder, whoami` unconditionally at import
9
+ # time, and huggingface_hub 1.0 removed HfFolder, so any resolution that
10
+ # picked huggingface_hub>=1.0 crashed on `import gradio` before app.py even
11
+ # ran. That's gone upstream -- gradio's own changelog has "Allow gradio to
12
+ # run with huggingface_hub 1.x", landed well before 6.26.0. uni2ts's
13
+ # PyTorchModelHubMixin.from_pretrained() (what moirai_model.py actually
14
+ # calls) isn't on the removed API either. No known reason left to cap this.
15
+ huggingface_hub>=0.23.0
16
 
17
  # Data
18
  yfinance>=0.2.40
 
20
  numpy>=1.24
21
 
22
  # UI (Hugging Face Spaces)
23
+ # Pinned to the 6.x line (floor at the version this build was verified
24
+ # against, ceiling below the next major) instead of a bare `>=` -- that's
25
+ # what let pip drift onto an untested gradio/starlette/fastapi combination
26
+ # last time. app.py's own component usage (Blocks/Tab/Row/Textbox/Dropdown/
27
+ # Slider/Button/Markdown/Dataframe/Accordion/JSON/Radio) doesn't touch any
28
+ # of the parameters the Gradio 6 migration guide removed, so no app.py
29
+ # changes were needed for this bump.
30
+ gradio>=6.26.0,<7
31
+
32
+ # --- REMOVED after upgrading to gradio 6.26.0 ---
33
+ # This file used to pin `starlette<1.0` because gradio 4.44.x's routes.py
34
+ # called Jinja2Templates.TemplateResponse the pre-1.0 way
35
+ # (`TemplateResponse(name, context)`), which breaks against Starlette>=1.0
36
+ # (the context dict lands in the `name` slot -> Jinja2 tries to hash it as
37
+ # a cache key -> `TypeError: unhashable type: 'dict'` on every page load).
38
+ # Gradio's own changelog shows a later commit -- "upgrade starlette
39
+ # dependency to 1.0.1 or higher" -- that updated routes.py to the new
40
+ # `TemplateResponse(request, name, context)` call and raised gradio's own
41
+ # floor accordingly. That fix is already in 6.26.0, so pinning
42
+ # starlette<1.0 now would fight gradio's real requirement instead of
43
+ # working around a bug, and could make pip's resolution fail outright.
44
 
45
  python-dateutil
46
  pytz