File size: 517 Bytes
dcdaaec
6ebfe78
2e07802
d810c79
 
 
88fd916
2e07802
6ebfe78
2e07802
6ebfe78
 
2e07802
6ebfe78
d810c79
6ebfe78
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr
from gradio import inputs
description = "Text generation with a miniature GPT"
from huggingface_hub import from_pretrained_keras
model = from_pretrained_keras("huggingface/keras-io/text-generation-miniature-gpt")

interface = gr.Interface.load("huggingface/pranavpsv/gpt2-genre-story-generator", 
	title = "Text Generation with GPT-2",
	inputs = [
        gr.inputs.Textbox(lines=5, label="Text"),
    ],
    description=description,
    examples=[["A kid is playing with "]]
)

interface.launch()