chansung commited on
Commit
6f97b29
·
1 Parent(s): 0edad49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -454,7 +454,9 @@ with gr.Blocks(css=STYLES) as demo:
454
  gr.Markdown(
455
  "This application is designed for you to collaborate with LLM to co-write stories. It is inspired by [Wordcraft project](https://wordcraft-writers-workshop.appspot.com/) from Google's PAIR and Magenta teams. "
456
  "This application built on [Gradio](https://www.gradio.app), and the underlying text generation is powered by [Hugging Face Inference API](https://huggingface.co/inference-api). The text generation model might"
457
- "be changed over time, but [meta-llama/Llama-2-70b-chat-hf](https://huggingface.co/meta-llama/Llama-2-70b-chat-hf) is selected for now.",
 
 
458
  elem_classes=['center', 'small-big'])
459
 
460
  with gr.Row():
@@ -517,6 +519,10 @@ with gr.Blocks(css=STYLES) as demo:
517
  regen_btn = gr.Button("regenerate", elem_classes=['control-label-font', 'control-button'])
518
 
519
  with gr.Tab("Exporting"):
 
 
 
 
520
  cover_art = gr.Image(interactive=False, elem_classes=['no-label-image'])
521
  gen_cover_art_prompt = gr.Textbox(lines=5, max_lines=5, elem_classes=['no-label'])
522
  # toggle between "generate prompt for cover art" and "generate cover art"
@@ -524,8 +530,8 @@ with gr.Blocks(css=STYLES) as demo:
524
  gen_pdf_btn = gr.Button("export as PDF", elem_classes=['control-label-font', 'control-button'])
525
  pdf_file = gr.File(visible=False)
526
 
527
- progress_bar = gr.Textbox(elem_classes=['no-label'])
528
-
529
  gen_pdf_btn.click(
530
  lambda t, e, c: generate_pdf(t, e, c),
531
  inputs=[title, editor, cover_art],
 
454
  gr.Markdown(
455
  "This application is designed for you to collaborate with LLM to co-write stories. It is inspired by [Wordcraft project](https://wordcraft-writers-workshop.appspot.com/) from Google's PAIR and Magenta teams. "
456
  "This application built on [Gradio](https://www.gradio.app), and the underlying text generation is powered by [Hugging Face Inference API](https://huggingface.co/inference-api). The text generation model might"
457
+ "be changed over time, but [meta-llama/Llama-2-70b-chat-hf](https://huggingface.co/meta-llama/Llama-2-70b-chat-hf) is selected for now. On the `exporting` tab, you can generate cover art for your story. You can "
458
+ "design your own prompt to generate the cover art, or you can let the LLaMA2 to generate one for you. Currently, the quantized Stable Diffusion model `nota-ai/bk-sdm-small` by [Nota AI](https://www.nota.ai/) is "
459
+ "used.",
460
  elem_classes=['center', 'small-big'])
461
 
462
  with gr.Row():
 
519
  regen_btn = gr.Button("regenerate", elem_classes=['control-label-font', 'control-button'])
520
 
521
  with gr.Tab("Exporting"):
522
+ gr.Markdown("generate cover art with [`nota-ai/bk-sdm-small`](https://huggingface.co/nota-ai/bk-sdm-small) model. "
523
+ "design your own prompt in the textbox below, or just hit 'generate prompt for cover art` button. LLaMA2 "
524
+ "model will suggest a prompt for you based on your story.")
525
+
526
  cover_art = gr.Image(interactive=False, elem_classes=['no-label-image'])
527
  gen_cover_art_prompt = gr.Textbox(lines=5, max_lines=5, elem_classes=['no-label'])
528
  # toggle between "generate prompt for cover art" and "generate cover art"
 
530
  gen_pdf_btn = gr.Button("export as PDF", elem_classes=['control-label-font', 'control-button'])
531
  pdf_file = gr.File(visible=False)
532
 
533
+ progress_bar = gr.Textbox(elem_classes=['no-label'])
534
+
535
  gen_pdf_btn.click(
536
  lambda t, e, c: generate_pdf(t, e, c),
537
  inputs=[title, editor, cover_art],