Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,7 @@
|
|
1 |
-
from transformers import AutoTokenizer, AutoModelForCausalLM
|
2 |
-
|
3 |
-
tokenizer = AutoTokenizer.from_pretrained("pranavpsv/gpt2-genre-story-generator")
|
4 |
-
|
5 |
-
model = AutoModelForCausalLM.from_pretrained("pranavpsv/gpt2-genre-story-generator")
|
6 |
-
|
7 |
import gradio as gr
|
8 |
from gradio import inputs
|
9 |
description = "Story generation with GPT-2"
|
10 |
-
interface = gr.Interface.load(
|
11 |
title = "Story Generation with GPT-2",
|
12 |
inputs = [
|
13 |
gr.inputs.Textbox(lines=7, label="Story"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
from gradio import inputs
|
3 |
description = "Story generation with GPT-2"
|
4 |
+
interface = gr.Interface.load("huggingface/pranavpsv/gpt2-genre-story-generator",
|
5 |
title = "Story Generation with GPT-2",
|
6 |
inputs = [
|
7 |
gr.inputs.Textbox(lines=7, label="Story"),
|