peterciank commited on
Commit
a666253
·
verified ·
1 Parent(s): 1d0665e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -1,8 +1,11 @@
 
1
  import streamlit as st
2
  import requests
3
 
 
4
  # Set up Hugging Face API details
5
- headers = {"Authorization": f"Bearer {HF_TOKEN}"}
 
6
  API_URL = "https://api-inference.huggingface.co/models/facebook/bart-large-cnn"
7
 
8
  # Function to query the Hugging Face model
 
1
+ import os
2
  import streamlit as st
3
  import requests
4
 
5
+
6
  # Set up Hugging Face API details
7
+ token=os.getenv("HF_TOKEN", None)
8
+ headers = {"Authorization": f"Bearer {token}"}
9
  API_URL = "https://api-inference.huggingface.co/models/facebook/bart-large-cnn"
10
 
11
  # Function to query the Hugging Face model