alfredplpl commited on
Commit
0d7bf2d
·
verified ·
1 Parent(s): 5899f8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -12,7 +12,6 @@ import os
12
 
13
  import torch
14
  import gradio as gr
15
- from huggingface_hub import login
16
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
17
 
18
  INPUT_MODEL = "elith/FinGuard-Input-310M"
@@ -25,8 +24,7 @@ if not HF_TOKEN:
25
  "HF_TOKEN is not set. Add it as a Space secret "
26
  "(Settings -> Variables and secrets) to pull the private model."
27
  )
28
- login(token=HF_TOKEN, add_to_git_credential=False)
29
-
30
  _tok = AutoTokenizer.from_pretrained(INPUT_MODEL, token=HF_TOKEN)
31
  _model = AutoModelForSequenceClassification.from_pretrained(
32
  INPUT_MODEL, token=HF_TOKEN, dtype=torch.float32).eval().to(DEVICE)
 
12
 
13
  import torch
14
  import gradio as gr
 
15
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
16
 
17
  INPUT_MODEL = "elith/FinGuard-Input-310M"
 
24
  "HF_TOKEN is not set. Add it as a Space secret "
25
  "(Settings -> Variables and secrets) to pull the private model."
26
  )
27
+
 
28
  _tok = AutoTokenizer.from_pretrained(INPUT_MODEL, token=HF_TOKEN)
29
  _model = AutoModelForSequenceClassification.from_pretrained(
30
  INPUT_MODEL, token=HF_TOKEN, dtype=torch.float32).eval().to(DEVICE)