mahynski commited on
Commit
8178bd6
·
1 Parent(s): f04afcf

degbu embeddings

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -78,14 +78,11 @@ with st.sidebar:
78
  "Enter your LLM token",
79
  value=None
80
  )
81
- if provider == 'openai':
82
- os.environ['OPENAI_API_KEY'] = llm_token
83
- elif provider == 'huggingface':
84
- os.environ['HFTOKEN'] = llm_token
85
 
86
  # Create LLM
87
  if llm_token is not None:
88
  if provider == 'openai':
 
89
  llm = OpenAI(
90
  model=llm_name,
91
  temperature=temperature,
@@ -97,6 +94,8 @@ with st.sidebar:
97
  Settings.num_output = max_tokens
98
  Settings.context_window = 4096 # max possible
99
  Settings.embed_model = OpenAIEmbedding()
 
 
100
 
101
  # Enter parsing Token
102
  parse_token = st.text_input(
 
78
  "Enter your LLM token",
79
  value=None
80
  )
 
 
 
 
81
 
82
  # Create LLM
83
  if llm_token is not None:
84
  if provider == 'openai':
85
+ os.environ['OPENAI_API_KEY'] = llm_token
86
  llm = OpenAI(
87
  model=llm_name,
88
  temperature=temperature,
 
94
  Settings.num_output = max_tokens
95
  Settings.context_window = 4096 # max possible
96
  Settings.embed_model = OpenAIEmbedding()
97
+ elif provider == 'huggingface':
98
+ os.environ['HFTOKEN'] = llm_token
99
 
100
  # Enter parsing Token
101
  parse_token = st.text_input(