Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import os
|
2 |
from huggingface_hub import HfApi, login
|
3 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
@@ -7,7 +8,7 @@ def process(model_id, dataset):
|
|
7 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
8 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
|
9 |
# Local Path of Model
|
10 |
-
model_path =
|
11 |
model.save_pretrained(model_path)
|
12 |
login(token=os.environ["HF_TOKEN"])
|
13 |
api = HfApi()
|
|
|
1 |
+
import gradio as gr
|
2 |
import os
|
3 |
from huggingface_hub import HfApi, login
|
4 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
|
|
8 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
9 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
|
10 |
# Local Path of Model
|
11 |
+
model_path = model_id
|
12 |
model.save_pretrained(model_path)
|
13 |
login(token=os.environ["HF_TOKEN"])
|
14 |
api = HfApi()
|