INNER CODE UNIT · Python
get_text_examples
OpenVGLab/OmniLottie · app.py:820
def get_text_examples():
examples = []
demo_txt_path = "./example/demo.txt"
if os.path.exists(demo_txt_path):
with open(demo_txt_path, 'r', encoding='utf-8') as f:
lines = [line.strip() for line in f.readlines() if line.strip()]
examples = [[line] for line in lines[:50]]
return examples
gr.Examples(
examples=get_text_examples(),
inputs=text_input,
label="📂 Example Prompts (Click to Load)",
examples_per_page=10,
cache_examples=False
)
text_generate_btn.click(