wi-lab commited on
Commit
dd3dd7c
·
1 Parent(s): 861db93

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +10 -11
app.py CHANGED
@@ -4,6 +4,15 @@ import sys
4
  from pathlib import Path
5
 
6
  import huggingface_hub as hf_hub
 
 
 
 
 
 
 
 
 
7
 
8
  # Gradio <-> hub compatibility shim: newer huggingface_hub removed HfFolder.
9
  if not hasattr(hf_hub, "HfFolder"):
@@ -18,18 +27,8 @@ if not hasattr(hf_hub, "HfFolder"):
18
 
19
  hf_hub.HfFolder = _HfFolderShim # type: ignore[attr-defined]
20
 
21
- import gradio as gr
22
- import torch
23
- import numpy as np
24
- import pandas as pd
25
- from sklearn.manifold import TSNE
26
- from sklearn.decomposition import PCA
27
- from sklearn.preprocessing import StandardScaler
28
- from sklearn.metrics import confusion_matrix, f1_score
29
- import matplotlib.pyplot as plt
30
-
31
  # Repo root for local imports
32
- REPO_ROOT = Path(__file__).resolve().parent.parent
33
  if str(REPO_ROOT) not in sys.path:
34
  sys.path.append(str(REPO_ROOT))
35
 
 
4
  from pathlib import Path
5
 
6
  import huggingface_hub as hf_hub
7
+ import gradio as gr
8
+ import torch
9
+ import numpy as np
10
+ import pandas as pd
11
+ from sklearn.manifold import TSNE
12
+ from sklearn.decomposition import PCA
13
+ from sklearn.preprocessing import StandardScaler
14
+ from sklearn.metrics import confusion_matrix, f1_score
15
+ import matplotlib.pyplot as plt
16
 
17
  # Gradio <-> hub compatibility shim: newer huggingface_hub removed HfFolder.
18
  if not hasattr(hf_hub, "HfFolder"):
 
27
 
28
  hf_hub.HfFolder = _HfFolderShim # type: ignore[attr-defined]
29
 
 
 
 
 
 
 
 
 
 
 
30
  # Repo root for local imports
31
+ REPO_ROOT = Path(__file__).resolve().parent
32
  if str(REPO_ROOT) not in sys.path:
33
  sys.path.append(str(REPO_ROOT))
34