ThomasBlumet
commited on
Commit
·
45b30ae
1
Parent(s):
9372c75
launch interface
Browse files
app.py
CHANGED
@@ -38,20 +38,21 @@ def delete_previous_text(history:list[tuple[str,str]]):
|
|
38 |
return history, message
|
39 |
|
40 |
# Créer une interface de saisie avec Gradio
|
41 |
-
|
42 |
with gr.Blocks() as demo:
|
43 |
gr.Markdown("TeLLMyStory chatbot")
|
44 |
#input_text = blocks.text(name="input_text", label="Enter your story idea here", default="Once upon a time, there was")
|
45 |
with gr.Row():
|
46 |
input_text = gr.Textbox(label="Enter your story idea here")
|
47 |
-
#clear_button =
|
48 |
-
#
|
|
|
49 |
|
50 |
with gr.Row():
|
51 |
gr.Markdown("History of your story ideas")
|
52 |
gen_story = gr.Textbox(label="History")
|
53 |
|
54 |
-
#send_button =
|
55 |
|
56 |
# Lancer l'interface
|
57 |
-
|
|
|
38 |
return history, message
|
39 |
|
40 |
# Créer une interface de saisie avec Gradio
|
41 |
+
interface = gr.Interface(fn=generate_text, inputs="text", outputs="text",title="TeLLMyStory",description="Enter your story idea and the model will generate the story based on it.")
|
42 |
with gr.Blocks() as demo:
|
43 |
gr.Markdown("TeLLMyStory chatbot")
|
44 |
#input_text = blocks.text(name="input_text", label="Enter your story idea here", default="Once upon a time, there was")
|
45 |
with gr.Row():
|
46 |
input_text = gr.Textbox(label="Enter your story idea here")
|
47 |
+
#clear_button = gr.Button("Clear",variant="secondary")
|
48 |
+
#clear_button.click(fn=clear_save_textbox, inputs=[input_text])
|
49 |
+
#retry_button = gr.Button("Retry", fn=delete_previous_text, inputs=[input_text],variants=["secondary"])
|
50 |
|
51 |
with gr.Row():
|
52 |
gr.Markdown("History of your story ideas")
|
53 |
gen_story = gr.Textbox(label="History")
|
54 |
|
55 |
+
#send_button = gr.Button(name="send_button", label="Send", fn=show_input_text, inputs=[input_text],outputs=[gen_story],variants=["primary"])
|
56 |
|
57 |
# Lancer l'interface
|
58 |
+
interface.launch()
|