AjayP13 commited on
Commit
22285d4
·
verified ·
1 Parent(s): ae36130

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -108,7 +108,7 @@ with gr.Blocks(theme="ParityError/[email protected]") as demo:
108
 
109
  gr.Markdown("# TinyStyler Demo")
110
  gr.Markdown(
111
- "Style transfer the source text into the target style, given some example texts of the target style. You can adjust re-ranking and top_p to your desire to control the quality of style transfer. A higher re-ranking value will generally result in better generations, at slower speed.\n\n*Please note: this demo runs on a CPU-only machine, generation is much faster when run locally with a GPU.*"
112
  )
113
 
114
  with gr.Row():
@@ -161,6 +161,10 @@ with gr.Blocks(theme="ParityError/[email protected]") as demo:
161
  output,
162
  )
163
 
 
 
 
 
164
  # Initialize the fields with the first example
165
  (
166
  example_dropdown.value,
 
108
 
109
  gr.Markdown("# TinyStyler Demo")
110
  gr.Markdown(
111
+ "Style transfer the source text into the target style, given some example texts of the target style. You can adjust re-ranking and top_p to your desire to control the quality of style transfer. A higher re-ranking value will generally result in better generations, at slower speed.\n\nYou can find the model at [https://huggingface.co/tinystyler/tinystyler](https://huggingface.co/tinystyler/tinystyler).\n\n*Please note: this demo runs on a CPU-only machine, generation is much faster when run locally with a GPU.*"
112
  )
113
 
114
  with gr.Row():
 
161
  output,
162
  )
163
 
164
+ # Pre-warm all examples
165
+ for preset_example in preset_examples.values():
166
+ run_tinystyler("A test.", preset_example["target_texts"], 1, 1.0, 1.0)
167
+
168
  # Initialize the fields with the first example
169
  (
170
  example_dropdown.value,