chansung commited on
Commit
0cff7d6
·
1 Parent(s): ed78ab3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -15
app.py CHANGED
@@ -76,23 +76,24 @@ def get_gallery():
76
 
77
  return images
78
 
79
- with gr.Blocks(css=STYLES, elem_id="container") as demo:
80
- gr.Markdown("## LLaMA2 Story Showcase", elem_classes=['center'])
81
- 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. "
82
- "Generated stories are archived in [chansung/llama2-stories](https://huggingface.co/datasets/chansung/llama2-stories) dataset repository. The gallery will be "
83
- "regularly updated in a daily basis.",
84
- elem_classes=['small-big', 'center'])
 
85
 
86
- gallery = gr.Gallery(get_gallery, every=3000, columns=5, container=False, elem_id="gallery")
87
 
88
- with gr.Column():
89
- title = gr.Markdown("title", visible=False, elem_classes=['center'])
90
- story = gr.Markdown("stories goes here...", visible=False, elem_classes=['small-big'])
91
 
92
- gallery.select(
93
- fn=gallery_select,
94
- inputs=[gallery],
95
- outputs=[title, story]
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()