acloudfan commited on
Commit
fef9211
1 Parent(s): 6b666e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -16
app.py CHANGED
@@ -1,10 +1,7 @@
1
- # Demonstrates the basic usage
2
- # 1. Select model
3
- # 2. Provide a query
4
- # 3. Invoke the model
5
 
6
  import streamlit as st
7
- from dotenv import load_dotenv
8
  import os
9
  import time
10
 
@@ -12,17 +9,6 @@ from langchain_community.llms import HuggingFaceHub
12
  from langchain_community.llms import HuggingFaceEndpoint
13
 
14
 
15
- # Load the API keys, if running locally
16
- # CHANGE the path to the env file
17
-
18
- # If HF space is used then set the env var HUGGINGFACEHUB_API_TOKEN in the settings
19
- try:
20
- load_dotenv('C:\\Users\\raj\\.jupyter\\.env')
21
- except:
22
- print("Environment file not found !! MUST find the env var HUGGINGFACEHUB_API_TOKEN to work.")
23
-
24
-
25
-
26
  # Title
27
  st.title('Try out the model')
28
 
 
1
+ # Demonstrates the basic usage of Streamlit
2
+ # Requires a Hugging Face secret value : HUGGINGFACEHUB_API_TOKEN
 
 
3
 
4
  import streamlit as st
 
5
  import os
6
  import time
7
 
 
9
  from langchain_community.llms import HuggingFaceEndpoint
10
 
11
 
 
 
 
 
 
 
 
 
 
 
 
12
  # Title
13
  st.title('Try out the model')
14