sidagarwal04 commited on
Commit
0d5ee43
·
verified ·
1 Parent(s): e0ef878

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -1,11 +1,6 @@
1
  import os
2
  import logging
3
  from dotenv import load_dotenv
4
- import subprocess
5
-
6
- # Force reinstall Gradio
7
- subprocess.run(["pip", "install", "--upgrade", "gradio==4.44.1"])
8
-
9
  import gradio as gr
10
  import threading
11
  import time
@@ -292,7 +287,7 @@ def get_history_by_session_id(session_id):
292
  def get_llm(model: str):
293
  """Retrieve the specified language model based on the model name."""
294
  model = model.lower().strip()
295
- env_key = f"LLM_MODEL_CONFIG_{model}"
296
  env_value = os.environ.get(env_key)
297
 
298
  if not env_value:
 
1
  import os
2
  import logging
3
  from dotenv import load_dotenv
 
 
 
 
 
4
  import gradio as gr
5
  import threading
6
  import time
 
287
  def get_llm(model: str):
288
  """Retrieve the specified language model based on the model name."""
289
  model = model.lower().strip()
290
+ env_key = f"LLM_MODEL_CONFIG_{model.replace('-', '_')}"
291
  env_value = os.environ.get(env_key)
292
 
293
  if not env_value: