Spaces:
Runtime error
Runtime error
🚸 catch inputs with no text
Browse filesSigned-off-by: peter szemraj <peterszemraj@gmail.com>
app.py
CHANGED
|
@@ -91,11 +91,15 @@ def proc_submission(
|
|
| 91 |
<div style="background-color: #880808; color: white; padding: 20px;">
|
| 92 |
<h3>Warning</h3>
|
| 93 |
<p>Input text is too short to summarize. Detected {len(input_text)} characters.
|
| 94 |
-
|
| 95 |
</div>
|
| 96 |
"""
|
| 97 |
logging.warning(msg)
|
|
|
|
| 98 |
history["WARNING"] = msg
|
|
|
|
|
|
|
|
|
|
| 99 |
_summaries = summarize_via_tokenbatches(
|
| 100 |
tr_in,
|
| 101 |
model_sm if "base" in model_size.lower() else model,
|
|
|
|
| 91 |
<div style="background-color: #880808; color: white; padding: 20px;">
|
| 92 |
<h3>Warning</h3>
|
| 93 |
<p>Input text is too short to summarize. Detected {len(input_text)} characters.
|
| 94 |
+
Please load text by selecting an example from the dropdown menu or by pasting text into the text box.</p>
|
| 95 |
</div>
|
| 96 |
"""
|
| 97 |
logging.warning(msg)
|
| 98 |
+
logging.warning("RETURNING EMPTY STRING")
|
| 99 |
history["WARNING"] = msg
|
| 100 |
+
|
| 101 |
+
return msg, "", []
|
| 102 |
+
|
| 103 |
_summaries = summarize_via_tokenbatches(
|
| 104 |
tr_in,
|
| 105 |
model_sm if "base" in model_size.lower() else model,
|