ganeshkamath89 commited on
Commit
5a65659
·
verified ·
1 Parent(s): a9875d9

Reducing the code to just inputs and outputs to see if it compiles fine

Browse files
Files changed (1) hide show
  1. app.py +10 -7
app.py CHANGED
@@ -1,9 +1,12 @@
1
  import gradio as gr
2
- interface = gr.Interface.load(
3
- "huggingface/pranavpsv/gpt2-genre-story-generator",
4
- inputs=[gr.Textbox(lines=7, label="Story")],
5
- description="Story generation with GPT-2",
6
- examples=[["Adventurer is approached by a mysterious stranger in the tavern for a new quest"]],
7
- outputs=[gr.Textbox(label='Story Generation Output')]
 
 
8
  )
9
- interface.launch()
 
 
1
  import gradio as gr
2
+
3
+ def greet(name, intensity):
4
+ return "Hello, " + name + "!" * intensity
5
+
6
+ demo = gr.Interface (
7
+ fn=greet,
8
+ inputs=[gr.Textbox(lines=7, label="Story URL")],
9
+ outputs=[gr.Textbox(lines=7, label="Story Summary")]
10
  )
11
+
12
+ demo.launch()