ghuman7 commited on
Commit
91236ed
1 Parent(s): 468924d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -1,9 +1,14 @@
1
  import streamlit as st
2
  import requests
 
3
 
4
  # Hugging Face API details
5
  API_URL = "https://api-inference.huggingface.co/models/facebook/blenderbot-400M-distill"
6
- headers = {"Authorization": f"Bearer {rag}"}
 
 
 
 
7
 
8
  # Function to query the model
9
  def query(payload):
 
1
  import streamlit as st
2
  import requests
3
+ import os
4
 
5
  # Hugging Face API details
6
  API_URL = "https://api-inference.huggingface.co/models/facebook/blenderbot-400M-distill"
7
+
8
+ # Access the secret API key stored as 'rag'
9
+ api_key = os.getenv('rag')
10
+
11
+ headers = {"Authorization": f"Bearer {api_key}"}
12
 
13
  # Function to query the model
14
  def query(payload):