Tokymin commited on
Commit
40ffc63
1 Parent(s): 6955f5c

更改路径

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -10,13 +10,12 @@ huggingface_token = os.getenv('HF_TOKEN')
10
  # Set up the token to use with the Hugging Face API
11
  if huggingface_token is not None:
12
  os.environ['HUGGINGFACE_CO_API_TOKEN'] = huggingface_token
13
- tokenizer = AutoTokenizer.from_pretrained("Tokymin/Mood_Anxiety_Disorder_Classify_Model/pytorch_model")
14
- model = AutoModelForSequenceClassification.from_pretrained("Tokymin/Mood_Anxiety_Disorder_Classify_Model/pytorch_model",
15
- num_labels=8)
16
  else:
17
  print("error, no token")
18
  exit(0)
19
-
 
20
  model.eval()
21
 
22
  def predict(text):
 
10
  # Set up the token to use with the Hugging Face API
11
  if huggingface_token is not None:
12
  os.environ['HUGGINGFACE_CO_API_TOKEN'] = huggingface_token
13
+ tokenizer = AutoTokenizer.from_pretrained("Tokymin/Mood_Anxiety_Disorder_Classify_Model")
 
 
14
  else:
15
  print("error, no token")
16
  exit(0)
17
+ model = AutoModelForSequenceClassification.from_pretrained("Tokymin/Mood_Anxiety_Disorder_Classify_Model",
18
+ num_labels=8)
19
  model.eval()
20
 
21
  def predict(text):