Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -419,7 +419,7 @@ def create_gradio_app():
|
|
419 |
with gr.Row():
|
420 |
with gr.Column(scale=1):
|
421 |
user_idea = gr.Textbox(
|
422 |
-
label="Your Fantasy Novel
|
423 |
placeholder="A hidden prophecy... a forgotten magic... an unlikely hero...",
|
424 |
lines=5,
|
425 |
interactive=True
|
@@ -427,10 +427,10 @@ def create_gradio_app():
|
|
427 |
generate_btn = gr.Button("Craft My Outline", elem_classes="gradio-button")
|
428 |
|
429 |
with gr.Column(scale=2):
|
430 |
-
output_html = gr.HTML(label="Your Generated Outline"
|
431 |
|
432 |
generate_btn.click(
|
433 |
-
fn=generate_fantasy_outline
|
434 |
inputs=[user_idea],
|
435 |
outputs=output_html
|
436 |
)
|
@@ -438,9 +438,7 @@ def create_gradio_app():
|
|
438 |
return demo
|
439 |
|
440 |
if __name__ == "__main__":
|
441 |
-
|
442 |
-
app.launch()
|
443 |
-
|
444 |
# import gradio as gr
|
445 |
# import base64
|
446 |
|
|
|
419 |
with gr.Row():
|
420 |
with gr.Column(scale=1):
|
421 |
user_idea = gr.Textbox(
|
422 |
+
label="Enter Your Fantasy Novel Idea",
|
423 |
placeholder="A hidden prophecy... a forgotten magic... an unlikely hero...",
|
424 |
lines=5,
|
425 |
interactive=True
|
|
|
427 |
generate_btn = gr.Button("Craft My Outline", elem_classes="gradio-button")
|
428 |
|
429 |
with gr.Column(scale=2):
|
430 |
+
output_html = gr.HTML(label="Your Generated Outline")
|
431 |
|
432 |
generate_btn.click(
|
433 |
+
fn=lambda idea: format_output(generate_fantasy_outline(idea)),,
|
434 |
inputs=[user_idea],
|
435 |
outputs=output_html
|
436 |
)
|
|
|
438 |
return demo
|
439 |
|
440 |
if __name__ == "__main__":
|
441 |
+
create_gradio_app()
|
|
|
|
|
442 |
# import gradio as gr
|
443 |
# import base64
|
444 |
|