Spaces:
Runtime error
Runtime error
ChaoChao2023
commited on
Commit
•
5e68272
1
Parent(s):
8be36f4
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,14 @@
|
|
1 |
import gradio as gr
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
)
|
9 |
-
|
|
|
|
|
|
|
|
|
10 |
|
|
|
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 |
+
examples = [["L'aventurier est approché par un mystérieux étranger, pour une nouvelle quête."]]
|
10 |
+
|
11 |
+
Series(translator_fr, story_gen, translator_en, description = description,
|
12 |
+
title = title,
|
13 |
+
examples=examples, inputs = gr.inputs.Textbox(lines = 10)).launch()
|
14 |
|