add hf login
Browse files
app.py
CHANGED
@@ -1,7 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
|
|
|
|
|
3 |
# Use a pipeline as a high-level helper
|
4 |
from transformers import pipeline
|
|
|
|
|
|
|
|
|
5 |
|
6 |
generator = pipeline("text-generation", model="artificial-nerds/gpt2-finetune-miio-v0.1")
|
7 |
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
import os
|
4 |
+
|
5 |
# Use a pipeline as a high-level helper
|
6 |
from transformers import pipeline
|
7 |
+
from huggingface_hub import login
|
8 |
+
|
9 |
+
HF_TOKEN = os.getenv('HF_TOKEN')
|
10 |
+
login(token=HF_TOKEN)
|
11 |
|
12 |
generator = pipeline("text-generation", model="artificial-nerds/gpt2-finetune-miio-v0.1")
|
13 |
|