merve HF staff commited on
Commit
a45bafd
·
1 Parent(s): 547c840

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -1,10 +1,12 @@
1
-
2
  import gradio as gr
3
  from gradio.mix import Series
4
- description = "Visual story generation with GPT-2 and VQGAN"
5
- story_gen = gr.Interface.load("huggingface/pranavpsv/gpt2-genre-story-generator",
6
- description=description,
7
- examples=[["Adventurer is approached by a mysterious stranger in the tavern for a new quest."]]
8
- )
9
- image_gen = gr.Interface.load("huggingface/flax-community/dalle-mini")
10
- Series(story_gen, image_gen, inputs = gr.inputs.Textbox(lines = 20)).launch()
 
 
 
 
 
1
  import gradio as gr
2
  from gradio.mix import Series
3
+
4
+ description = "Generate your own D&D story!"
5
+ title = "French Story Generator using Opus MT and GPT-2"
6
+ translator_fr = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-fr-en")
7
+ story_gen = gr.Interface.load("huggingface/pranavpsv/gpt2-genre-story-generator")
8
+ translator_en = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-en-fr")
9
+
10
+ Series(translator_fr, story_gen, translator_en, description = description,
11
+ title = title,
12
+ examples=["L'aventurier est approché par un mystérieux étranger, pour une nouvelle quête."], inputs = gr.inputs.Textbox(lines = 10)).launch()