Spaces:
Running
Running
Update the progress bar's increment
Browse files
app.py
CHANGED
|
@@ -83,7 +83,6 @@ APP_TEXT = _load_strings()
|
|
| 83 |
CHAT_MESSAGES = 'chat_messages'
|
| 84 |
DOWNLOAD_FILE_KEY = 'download_file_name'
|
| 85 |
IS_IT_REFINEMENT = 'is_it_refinement'
|
| 86 |
-
APPROX_TARGET_LENGTH = GlobalConfig.LLM_MODEL_MAX_OUTPUT_LENGTH / 2
|
| 87 |
|
| 88 |
|
| 89 |
logger = logging.getLogger(__name__)
|
|
@@ -205,7 +204,9 @@ def set_up_chat_ui():
|
|
| 205 |
response += chunk
|
| 206 |
|
| 207 |
# Update the progress bar
|
| 208 |
-
progress_percentage = min(
|
|
|
|
|
|
|
| 209 |
progress_bar.progress(
|
| 210 |
progress_percentage,
|
| 211 |
text='Streaming content...this might take a while...'
|
|
|
|
| 83 |
CHAT_MESSAGES = 'chat_messages'
|
| 84 |
DOWNLOAD_FILE_KEY = 'download_file_name'
|
| 85 |
IS_IT_REFINEMENT = 'is_it_refinement'
|
|
|
|
| 86 |
|
| 87 |
|
| 88 |
logger = logging.getLogger(__name__)
|
|
|
|
| 204 |
response += chunk
|
| 205 |
|
| 206 |
# Update the progress bar
|
| 207 |
+
progress_percentage = min(
|
| 208 |
+
len(response) / GlobalConfig.LLM_MODEL_MAX_OUTPUT_LENGTH, 0.95
|
| 209 |
+
)
|
| 210 |
progress_bar.progress(
|
| 211 |
progress_percentage,
|
| 212 |
text='Streaming content...this might take a while...'
|