hucruz commited on
Commit
36a4776
·
1 Parent(s): 9e487f2

add hf login

Browse files
Files changed (1) hide show
  1. app.py +6 -0
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