Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -138,7 +138,8 @@ def summarize_url(url):
|
|
| 138 |
result = asyncio.run(fetch_data(url))
|
| 139 |
text = concatenate_text(result)
|
| 140 |
translated_text = translate_text(text)
|
| 141 |
-
|
|
|
|
| 142 |
alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
|
| 143 |
|
| 144 |
### Instruction:
|
|
|
|
| 138 |
result = asyncio.run(fetch_data(url))
|
| 139 |
text = concatenate_text(result)
|
| 140 |
translated_text = translate_text(text)
|
| 141 |
+
if len(translated_text) < 100:
|
| 142 |
+
return 'not scraped or short text'
|
| 143 |
alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
|
| 144 |
|
| 145 |
### Instruction:
|