isitcoding commited on
Commit
7d5545b
·
verified ·
1 Parent(s): 3a366ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,8 +1,9 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
 
4
  # Initialize the text generation pipeline
5
- generator = pipeline("text-generation", model="isitcoding/gpt2_120_finetuned", tokenizer="isitcoding/gpt2_120_finetuned")
6
 
7
  # Define the response function with additional options for customization
8
  def text_generation(
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ hf_token = os.getenv("hf_token")
5
  # Initialize the text generation pipeline
6
+ generator = pipeline("text-generation", model="isitcoding/gpt2_120_finetuned", use_auth_token=hf_token)
7
 
8
  # Define the response function with additional options for customization
9
  def text_generation(