Spaces:
Sleeping
Sleeping
Luis J Camargo commited on
Commit ·
3d86884
1
Parent(s): 9c99e59
some fix
Browse files
app.py
CHANGED
|
@@ -101,11 +101,11 @@ def inference(img):
|
|
| 101 |
generation_kwargs = dict(
|
| 102 |
**inputs,
|
| 103 |
streamer=streamer,
|
| 104 |
-
max_new_tokens=128,
|
| 105 |
min_new_tokens=2,
|
| 106 |
-
do_sample=
|
| 107 |
-
use_cache=
|
| 108 |
-
temperature=1.5,
|
| 109 |
min_p=0.1,
|
| 110 |
)
|
| 111 |
|
|
@@ -114,8 +114,8 @@ def inference(img):
|
|
| 114 |
thread.start()
|
| 115 |
|
| 116 |
generated_text = ""
|
| 117 |
-
status_indicator = "
|
| 118 |
-
yield "
|
| 119 |
for new_text in streamer:
|
| 120 |
if generated_text == "":
|
| 121 |
# Todo: remove the removal of first character when the model is fixed
|
|
|
|
| 101 |
generation_kwargs = dict(
|
| 102 |
**inputs,
|
| 103 |
streamer=streamer,
|
| 104 |
+
max_new_tokens=128,
|
| 105 |
min_new_tokens=2,
|
| 106 |
+
do_sample=True,
|
| 107 |
+
use_cache=True,
|
| 108 |
+
temperature=1.5,
|
| 109 |
min_p=0.1,
|
| 110 |
)
|
| 111 |
|
|
|
|
| 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
|