Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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",
|
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(
|