staghado commited on
Commit
a608f20
·
verified ·
1 Parent(s): 111a99e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -4,8 +4,12 @@ import json
4
  import requests
5
  import gradio as gr
6
 
7
- ENDPOINT = os.getenv("VLLM_ENDPOINT")
8
- MODEL = os.getenv("VLLM_MODEL")
 
 
 
 
9
 
10
  if not ENDPOINT or not MODEL:
11
  raise ValueError("VLLM_ENDPOINT and VLLM_MODEL environment variables must be set")
@@ -69,6 +73,10 @@ def respond(
69
  except Exception as e:
70
  yield f"Error: {str(e)}"
71
 
 
 
 
 
72
  chatbot = gr.ChatInterface(
73
  respond,
74
  type="messages",
 
4
  import requests
5
  import gradio as gr
6
 
7
+ ENDPOINT = os.environ.get("VLLM_ENDPOINT") or os.getenv("VLLM_ENDPOINT")
8
+ MODEL = os.environ.get("VLLM_MODEL") or os.getenv("VLLM_MODEL")
9
+
10
+ print(f"Debug - Found ENDPOINT: {ENDPOINT is not None}")
11
+ print(f"Debug - Found MODEL: {MODEL is not None}")
12
+ print(f"Debug - All env vars: {list(os.environ.keys())}")
13
 
14
  if not ENDPOINT or not MODEL:
15
  raise ValueError("VLLM_ENDPOINT and VLLM_MODEL environment variables must be set")
 
73
  except Exception as e:
74
  yield f"Error: {str(e)}"
75
 
76
+
77
+ """
78
+ For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
79
+ """
80
  chatbot = gr.ChatInterface(
81
  respond,
82
  type="messages",