Spaces:
Runtime error
Runtime error
Songwei Ge
commited on
Commit
·
ba87c8b
1
Parent(s):
18b1465
instruction
Browse files
app.py
CHANGED
|
@@ -19,7 +19,11 @@ from PIL import Image, ImageOps
|
|
| 19 |
|
| 20 |
|
| 21 |
help_text = """
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
"""
|
| 24 |
|
| 25 |
|
|
@@ -146,6 +150,9 @@ def main():
|
|
| 146 |
result = gr.Image(label='Result')
|
| 147 |
token_map = gr.Image(label='TokenMap')
|
| 148 |
|
|
|
|
|
|
|
|
|
|
| 149 |
with gr.Row():
|
| 150 |
examples = [
|
| 151 |
[
|
|
@@ -213,8 +220,6 @@ def main():
|
|
| 213 |
fn=generate,
|
| 214 |
# cache_examples=True,
|
| 215 |
examples_per_page=20)
|
| 216 |
-
with gr.Row():
|
| 217 |
-
gr.Markdown(help_text)
|
| 218 |
|
| 219 |
generate_button.click(
|
| 220 |
fn=generate,
|
|
|
|
| 19 |
|
| 20 |
|
| 21 |
help_text = """
|
| 22 |
+
If you are getting an error or not getting what you want, here are some possible reasons and suggestions:
|
| 23 |
+
1. Error: the model only supports formatting the complete tooken. An error occurs when part of the token is formatted.
|
| 24 |
+
2. Sometimes the token map does not accurately capture the region of the formatted tokens. You may play with selecting more / less tokens to increase / decrease the area covered by the token maps.
|
| 25 |
+
3. If you use font color and get completely corrupted results, you may consider decrease the color weight lambda.
|
| 26 |
+
4. Use a different seed.
|
| 27 |
"""
|
| 28 |
|
| 29 |
|
|
|
|
| 150 |
result = gr.Image(label='Result')
|
| 151 |
token_map = gr.Image(label='TokenMap')
|
| 152 |
|
| 153 |
+
with gr.Row():
|
| 154 |
+
gr.Markdown(help_text)
|
| 155 |
+
|
| 156 |
with gr.Row():
|
| 157 |
examples = [
|
| 158 |
[
|
|
|
|
| 220 |
fn=generate,
|
| 221 |
# cache_examples=True,
|
| 222 |
examples_per_page=20)
|
|
|
|
|
|
|
| 223 |
|
| 224 |
generate_button.click(
|
| 225 |
fn=generate,
|