Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -5,7 +5,7 @@ from pydantic import BaseModel
|
|
5 |
import re
|
6 |
import os
|
7 |
|
8 |
-
|
9 |
|
10 |
app = FastAPI()
|
11 |
|
@@ -105,7 +105,9 @@ async def root(item: Item):
|
|
105 |
|
106 |
article = extract_article_content(item.url)
|
107 |
|
108 |
-
|
|
|
|
|
109 |
API_URL = "https://api-inference.huggingface.co/models/facebook/bart-large-cnn"
|
110 |
headers = {'Authorization': token}
|
111 |
|
|
|
5 |
import re
|
6 |
import os
|
7 |
|
8 |
+
|
9 |
|
10 |
app = FastAPI()
|
11 |
|
|
|
105 |
|
106 |
article = extract_article_content(item.url)
|
107 |
|
108 |
+
token = os.environ.get("huggingface_token")
|
109 |
+
if token:
|
110 |
+
print("flag")
|
111 |
API_URL = "https://api-inference.huggingface.co/models/facebook/bart-large-cnn"
|
112 |
headers = {'Authorization': token}
|
113 |
|