Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -70,7 +70,27 @@ def generate_story(file_paths, progress=gr.Progress(track_tqdm=True)):
|
|
70 |
|
71 |
return story
|
72 |
|
73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
gr.Markdown("# Qwen Storyteller \n## Upload up to 6 images to generate a creative story.")
|
75 |
|
76 |
with gr.Row():
|
@@ -79,8 +99,12 @@ with gr.Blocks() as demo:
|
|
79 |
output_file = gr.File(label="Uploaded Files")
|
80 |
|
81 |
with gr.Column():
|
82 |
-
outputs = gr.
|
83 |
|
|
|
|
|
|
|
|
|
84 |
upload_button.upload(lambda files: [f.name for f in files], upload_button, output_file)
|
85 |
|
86 |
gen_button = gr.Button("Generate", variant="secondary")
|
|
|
70 |
|
71 |
return story
|
72 |
|
73 |
+
const footerMD2 = """
|
74 |
+
@misc{oliveira2025storyreasoningdatasetusingchainofthought,
|
75 |
+
title={StoryReasoning Dataset: Using Chain-of-Thought for Scene Understanding and Grounded Story Generation},
|
76 |
+
author={Daniel A. P. Oliveira and David Martins de Matos},
|
77 |
+
year={2025},
|
78 |
+
eprint={2505.10292},
|
79 |
+
archivePrefix={arXiv},
|
80 |
+
primaryClass={cs.CV},
|
81 |
+
url={https://arxiv.org/abs/2505.10292},
|
82 |
+
}
|
83 |
+
"""
|
84 |
+
const footerMD = """
|
85 |
+
### Key Features
|
86 |
+
* Cross-Frame Consistency: Maintains consistent character and object identity across multiple frames through visual similarity and face recognition techniques
|
87 |
+
* Structured Reasoning: Employs chain-of-thought reasoning to analyze scenes with explicit modeling of characters, objects, settings, and narrative structure
|
88 |
+
* Grounded Storytelling: Uses specialized XML tags to link narrative elements directly to visual entities
|
89 |
+
* Reduced Hallucinations: Achieves 12.3% fewer hallucinations compared to the non-fine-tuned base model
|
90 |
+
|
91 |
+
Model trained by daniel3303, [repository here.](https://huggingface.co/daniel3303/QwenStoryteller)
|
92 |
+
"""
|
93 |
+
with gr.Blocks(fill_height=True) as demo:
|
94 |
gr.Markdown("# Qwen Storyteller \n## Upload up to 6 images to generate a creative story.")
|
95 |
|
96 |
with gr.Row():
|
|
|
99 |
output_file = gr.File(label="Uploaded Files")
|
100 |
|
101 |
with gr.Column():
|
102 |
+
outputs = gr.Markdown(label="Generated Story", show_copy_button=True)
|
103 |
|
104 |
+
with gr.Row():
|
105 |
+
gr.Markdown(footerMD)
|
106 |
+
gr.Markdown(footerMD2)
|
107 |
+
|
108 |
upload_button.upload(lambda files: [f.name for f in files], upload_button, output_file)
|
109 |
|
110 |
gen_button = gr.Button("Generate", variant="secondary")
|