Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,11 @@
|
|
|
|
1 |
import streamlit as st
|
2 |
import requests
|
3 |
|
|
|
4 |
# Set up Hugging Face API details
|
5 |
-
|
|
|
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
|