hodfa840 commited on
Commit
a1edf08
Β·
1 Parent(s): e61d8c7

fix: remove monkeypatch to restore standard HF auth handshake

Browse files
Files changed (1) hide show
  1. app.py +0 -17
app.py CHANGED
@@ -8,23 +8,6 @@ autonomous prompt adaptation, and hybrid RAG retrieval.
8
  import logging
9
  import sys
10
 
11
- # ── HF Hub Compatibility Monkeypatch ───────────────────────────────────────
12
- # Fix for: ImportError: cannot import name 'HfFolder' from 'huggingface_hub'
13
- # This happens in HF Spaces with newer hub versions and older Gradio versions.
14
- try:
15
- import huggingface_hub
16
- if not hasattr(huggingface_hub, "HfFolder"):
17
- class MockHfFolder:
18
- @staticmethod
19
- def get_token(): return None
20
- @staticmethod
21
- def save_token(token): pass
22
- @staticmethod
23
- def delete_token(): pass
24
- huggingface_hub.HfFolder = MockHfFolder
25
- except ImportError:
26
- pass
27
-
28
  import gradio as gr
29
  import plotly.graph_objects as go
30
  from modules.data_simulation import generate_catalog, get_scenarios
 
8
  import logging
9
  import sys
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  import gradio as gr
12
  import plotly.graph_objects as go
13
  from modules.data_simulation import generate_catalog, get_scenarios