更换path
Browse files
app.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
from pathlib import Path
|
2 |
-
|
3 |
import streamlit as st
|
4 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
5 |
import torch
|
@@ -22,8 +21,8 @@ else:
|
|
22 |
# response = requests.post(API_URL, headers=headers, json=payload)
|
23 |
# return response.json()
|
24 |
# data = query("Can you please let us know more details about your ")
|
25 |
-
path =
|
26 |
-
tokenizer = AutoTokenizer.from_pretrained(path, cache_dir='/home/user', token=huggingface_token)
|
27 |
|
28 |
# tokenizer = AutoTokenizer.from_pretrained('Tokymin/Mood_Anxiety_Disorder_Classify_Model')
|
29 |
model = AutoModelForSequenceClassification.from_pretrained("Tokymin/Mood_Anxiety_Disorder_Classify_Model",num_labels=8)
|
|
|
1 |
from pathlib import Path
|
|
|
2 |
import streamlit as st
|
3 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
4 |
import torch
|
|
|
21 |
# response = requests.post(API_URL, headers=headers, json=payload)
|
22 |
# return response.json()
|
23 |
# data = query("Can you please let us know more details about your ")
|
24 |
+
path: Path = Path('Tokymin/Mood_Anxiety_Disorder_Classify_Model')
|
25 |
+
tokenizer = AutoTokenizer.from_pretrained(pretrained_model_name_or_path=path, cache_dir='/home/user', token=huggingface_token)
|
26 |
|
27 |
# tokenizer = AutoTokenizer.from_pretrained('Tokymin/Mood_Anxiety_Disorder_Classify_Model')
|
28 |
model = AutoModelForSequenceClassification.from_pretrained("Tokymin/Mood_Anxiety_Disorder_Classify_Model",num_labels=8)
|