Upload 2 files
Browse files- app.py +2 -0
- requirements.txt +2 -1
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
import os
|
|
|
4 |
from transformers import AutoModelForSequenceClassification, TrainingArguments, Trainer
|
5 |
from transformers import AutoTokenizer
|
6 |
|
@@ -17,6 +18,7 @@ model_name = "roberta-base"
|
|
17 |
learning_rate = 5e-5
|
18 |
batch_size_train = 64
|
19 |
step = 1900
|
|
|
20 |
|
21 |
file_name = "model-{}.pt".format(step)
|
22 |
state_dict = torch.load(os.path.join(file_name))
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
import os
|
4 |
+
from huggingface_hub import login
|
5 |
from transformers import AutoModelForSequenceClassification, TrainingArguments, Trainer
|
6 |
from transformers import AutoTokenizer
|
7 |
|
|
|
18 |
learning_rate = 5e-5
|
19 |
batch_size_train = 64
|
20 |
step = 1900
|
21 |
+
login(token='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')
|
22 |
|
23 |
file_name = "model-{}.pt".format(step)
|
24 |
state_dict = torch.load(os.path.join(file_name))
|
requirements.txt
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
gradio
|
2 |
torch
|
3 |
-
transformers
|
|
|
|
1 |
gradio
|
2 |
torch
|
3 |
+
transformers
|
4 |
+
huggingface_hub
|