Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -5,7 +5,7 @@ from fastapi.responses import StreamingResponse
|
|
| 5 |
from pydantic import BaseModel
|
| 6 |
import re
|
| 7 |
import replicate
|
| 8 |
-
import
|
| 9 |
from supabase import create_client, Client
|
| 10 |
|
| 11 |
url: str = os.environ.get("DB_URL")
|
|
@@ -118,7 +118,7 @@ async def root(site: str = 'abcnews.go'):
|
|
| 118 |
try:
|
| 119 |
|
| 120 |
response = supabase.table('news').select("*")
|
| 121 |
-
.eq('source', 'www.
|
| 122 |
.order('published_date', desc=True).limit(15).execute()
|
| 123 |
|
| 124 |
|
|
|
|
| 5 |
from pydantic import BaseModel
|
| 6 |
import re
|
| 7 |
import replicate
|
| 8 |
+
import os
|
| 9 |
from supabase import create_client, Client
|
| 10 |
|
| 11 |
url: str = os.environ.get("DB_URL")
|
|
|
|
| 118 |
try:
|
| 119 |
|
| 120 |
response = supabase.table('news').select("*")
|
| 121 |
+
.eq('source', f'www.{site}.com').is_('image_url', 'null')
|
| 122 |
.order('published_date', desc=True).limit(15).execute()
|
| 123 |
|
| 124 |
|