Spaces:
Runtime error
Runtime error
Omar Sanseviero
commited on
Commit
·
8755059
1
Parent(s):
3040efa
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,17 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
)
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
from gradio.mix import Series
|
| 4 |
+
|
| 5 |
+
description = "Generate your own D&D story!"
|
| 6 |
+
title = "French Story Generator using Opus MT and GPT-2"
|
| 7 |
+
|
| 8 |
+
translator_fr = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-fr-en")
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
story_gen = gr.Interface.load("huggingface/pranavpsv/gpt2-genre-story-generator")
|
| 12 |
+
|
| 13 |
+
translator_en = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-en-fr")
|
| 14 |
+
|
| 15 |
+
Series(translator_fr, story_gen, translator_en, description = description,
|
| 16 |
+
title = title,
|
| 17 |
+
examples=[["L'aventurier est approché par un mystérieux étranger, pour une nouvelle quête."]], inputs = gr.inputs.Textbox(lines = 10)).launch()
|