Spaces:
Sleeping
Sleeping
Luis J Camargo
commited on
Commit
·
c5c78d0
1
Parent(s):
3d86884
increase max tokens
Browse files
app.py
CHANGED
|
@@ -101,7 +101,7 @@ def inference(img):
|
|
| 101 |
generation_kwargs = dict(
|
| 102 |
**inputs,
|
| 103 |
streamer=streamer,
|
| 104 |
-
max_new_tokens=
|
| 105 |
min_new_tokens=2,
|
| 106 |
do_sample=True,
|
| 107 |
use_cache=True,
|
|
@@ -114,8 +114,8 @@ def inference(img):
|
|
| 114 |
thread.start()
|
| 115 |
|
| 116 |
generated_text = ""
|
| 117 |
-
status_indicator = "
|
| 118 |
-
yield "The text will start showing shortly... ⏳"
|
| 119 |
for new_text in streamer:
|
| 120 |
if generated_text == "":
|
| 121 |
# Todo: remove the removal of first character when the model is fixed
|
|
@@ -137,7 +137,7 @@ def inference(img):
|
|
| 137 |
|
| 138 |
# --- Interface Setup ---
|
| 139 |
|
| 140 |
-
title = '🌎 Tachiwin OCR for the Indigenous Languages of Mexico'
|
| 141 |
|
| 142 |
description = '''
|
| 143 |
### PaddleOCR-VL Fine-tuned for the 68 Indigenous Languages of Mexico
|
|
@@ -198,7 +198,7 @@ demo = gr.Interface(
|
|
| 198 |
article=f"""
|
| 199 |
{example_labels}
|
| 200 |
|
| 201 |
-
### About Tachiwin
|
| 202 |
|
| 203 |
**Tachiwin** (from Totonac - "Language") is dedicated to bridging
|
| 204 |
the digital divide for indigenous languages of Mexico through AI technology.
|
|
@@ -216,8 +216,8 @@ demo = gr.Interface(
|
|
| 216 |
|
| 217 |
---
|
| 218 |
|
| 219 |
-
Made with ❤️ for linguistic diversity and indigenous rights
|
| 220 |
-
|
| 221 |
"""
|
| 222 |
)
|
| 223 |
|
|
|
|
| 101 |
generation_kwargs = dict(
|
| 102 |
**inputs,
|
| 103 |
streamer=streamer,
|
| 104 |
+
max_new_tokens=256,
|
| 105 |
min_new_tokens=2,
|
| 106 |
do_sample=True,
|
| 107 |
use_cache=True,
|
|
|
|
| 114 |
thread.start()
|
| 115 |
|
| 116 |
generated_text = ""
|
| 117 |
+
status_indicator = " 🦡 ...generating ⏳"
|
| 118 |
+
yield "🦡 The text will start showing shortly... ⏳"
|
| 119 |
for new_text in streamer:
|
| 120 |
if generated_text == "":
|
| 121 |
# Todo: remove the removal of first character when the model is fixed
|
|
|
|
| 137 |
|
| 138 |
# --- Interface Setup ---
|
| 139 |
|
| 140 |
+
title = '🌎 Tachiwin OCR for the Indigenous Languages of Mexico 🦡'
|
| 141 |
|
| 142 |
description = '''
|
| 143 |
### PaddleOCR-VL Fine-tuned for the 68 Indigenous Languages of Mexico
|
|
|
|
| 198 |
article=f"""
|
| 199 |
{example_labels}
|
| 200 |
|
| 201 |
+
### About Tachiwin 🦡
|
| 202 |
|
| 203 |
**Tachiwin** (from Totonac - "Language") is dedicated to bridging
|
| 204 |
the digital divide for indigenous languages of Mexico through AI technology.
|
|
|
|
| 216 |
|
| 217 |
---
|
| 218 |
|
| 219 |
+
Made with ❤️ for linguistic diversity and indigenous rights 🦡
|
| 220 |
+
|
| 221 |
"""
|
| 222 |
)
|
| 223 |
|