SwatGarg commited on
Commit
a9485fb
1 Parent(s): 5da2a5b

Update generator.py

Browse files
Files changed (1) hide show
  1. generator.py +5 -0
generator.py CHANGED
@@ -1,7 +1,12 @@
1
  import os
 
2
  from langchain_community.llms import HuggingFaceEndpoint
3
  from pydantic import ValidationError
4
 
 
 
 
 
5
  def load_llm(repo_id="mistralai/Mistral-7B-Instruct-v0.2", token=os.getenv("HUGGINGFACE_API_TOKEN")):
6
  '''
7
  Load the LLM from the HuggingFace model hub
 
1
  import os
2
+ import streamlit as st
3
  from langchain_community.llms import HuggingFaceEndpoint
4
  from pydantic import ValidationError
5
 
6
+ st.write(
7
+ "Has environment variables been set:",
8
+ os.environ["HUGGINGFACE_API_TOKEN"] == st.secrets["HUGGINGFACE_API_TOKEN"])
9
+
10
  def load_llm(repo_id="mistralai/Mistral-7B-Instruct-v0.2", token=os.getenv("HUGGINGFACE_API_TOKEN")):
11
  '''
12
  Load the LLM from the HuggingFace model hub