Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -76,23 +76,24 @@ def get_gallery():
|
|
76 |
|
77 |
return images
|
78 |
|
79 |
-
with gr.Blocks(css=STYLES
|
80 |
-
gr.
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
|
|
85 |
|
86 |
-
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
|
98 |
demo.launch()
|
|
|
76 |
|
77 |
return images
|
78 |
|
79 |
+
with gr.Blocks(css=STYLES) as demo:
|
80 |
+
with gr.Column(elem_id="container"):
|
81 |
+
gr.Markdown("## LLaMA2 Story Showcase", elem_classes=['center'])
|
82 |
+
gr.Markdown("This space is where community shares generated stories by [chansung/co-write-with-llama2](https://huggingface.co/spaces/chansung/co-write-with-llama2) space. "
|
83 |
+
"Generated stories are archived in [chansung/llama2-stories](https://huggingface.co/datasets/chansung/llama2-stories) dataset repository. The gallery will be "
|
84 |
+
"regularly updated in a daily basis.",
|
85 |
+
elem_classes=['small-big', 'center'])
|
86 |
|
87 |
+
gallery = gr.Gallery(get_gallery, every=3000, columns=5, container=False, elem_id="gallery")
|
88 |
|
89 |
+
with gr.Column():
|
90 |
+
title = gr.Markdown("title", visible=False, elem_classes=['center'])
|
91 |
+
story = gr.Markdown("stories goes here...", visible=False, elem_classes=['small-big'])
|
92 |
|
93 |
+
gallery.select(
|
94 |
+
fn=gallery_select,
|
95 |
+
inputs=[gallery],
|
96 |
+
outputs=[title, story]
|
97 |
+
)
|
98 |
|
99 |
demo.launch()
|