yashxx07 commited on
Commit
453fb62
·
verified ·
1 Parent(s): 72e6d3f

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -2
main.py CHANGED
@@ -5,7 +5,7 @@ from pydantic import BaseModel
5
  import re
6
  import os
7
 
8
- token = os.environ.get("huggingface_token")
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