Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,11 +1,10 @@
|
|
| 1 |
# URL: https://huggingface.co/spaces/gradio/text_generation
|
| 2 |
# imports
|
| 3 |
import gradio as gr
|
| 4 |
-
from transformers import pipeline
|
| 5 |
|
| 6 |
# loading the model
|
| 7 |
generator = pipeline('text-generation', model='gpt2')
|
| 8 |
-
set_seed(42)
|
| 9 |
|
| 10 |
|
| 11 |
# defining the core function
|
|
|
|
| 1 |
# URL: https://huggingface.co/spaces/gradio/text_generation
|
| 2 |
# imports
|
| 3 |
import gradio as gr
|
| 4 |
+
from transformers import pipeline
|
| 5 |
|
| 6 |
# loading the model
|
| 7 |
generator = pipeline('text-generation', model='gpt2')
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
# defining the core function
|