Spaces:
Running
on
Zero
Running
on
Zero
Fix errors
Browse files
app.py
CHANGED
|
@@ -63,6 +63,11 @@ def generate_text(
|
|
| 63 |
url = url.strip()
|
| 64 |
|
| 65 |
if url.startswith("https://twitter.com/") or url.startswith("https://x.com/"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
return (
|
| 67 |
"🤖 Vaya, parece que has introducido la url de un tweet. No puedo acceder a tweets, tienes que introducir la URL de una noticia.",
|
| 68 |
"❌❌❌ Si el tweet contiene una noticia, dame la URL de la noticia ❌❌❌",
|
|
@@ -87,6 +92,11 @@ def generate_text(
|
|
| 87 |
text = None
|
| 88 |
|
| 89 |
if title is None or text is None:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
return (
|
| 91 |
"🤖 No he podido acceder a la notica, asegurate que la URL es correcta y que es posible acceder a la noticia desde un navegador.",
|
| 92 |
"❌❌❌ Inténtalo de nuevo ❌❌❌",
|
|
|
|
| 63 |
url = url.strip()
|
| 64 |
|
| 65 |
if url.startswith("https://twitter.com/") or url.startswith("https://x.com/"):
|
| 66 |
+
yield (
|
| 67 |
+
"🤖 Vaya, parece que has introducido la url de un tweet. No puedo acceder a tweets, tienes que introducir la URL de una noticia.",
|
| 68 |
+
"❌❌❌ Si el tweet contiene una noticia, dame la URL de la noticia ❌❌❌",
|
| 69 |
+
"Error",
|
| 70 |
+
)
|
| 71 |
return (
|
| 72 |
"🤖 Vaya, parece que has introducido la url de un tweet. No puedo acceder a tweets, tienes que introducir la URL de una noticia.",
|
| 73 |
"❌❌❌ Si el tweet contiene una noticia, dame la URL de la noticia ❌❌❌",
|
|
|
|
| 92 |
text = None
|
| 93 |
|
| 94 |
if title is None or text is None:
|
| 95 |
+
yield (
|
| 96 |
+
"🤖 No he podido acceder a la notica, asegurate que la URL es correcta y que es posible acceder a la noticia desde un navegador.",
|
| 97 |
+
"❌❌❌ Inténtalo de nuevo ❌❌❌",
|
| 98 |
+
"Error",
|
| 99 |
+
)
|
| 100 |
return (
|
| 101 |
"🤖 No he podido acceder a la notica, asegurate que la URL es correcta y que es posible acceder a la noticia desde un navegador.",
|
| 102 |
"❌❌❌ Inténtalo de nuevo ❌❌❌",
|