aymonc commited on
Commit
a615da6
·
verified ·
1 Parent(s): a62065f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -5,6 +5,9 @@ import gradio as gr
5
 
6
  # os.environ["OPENAI_API_KEY"] = "sk-..." # Replace with your key
7
 
 
 
 
8
  llm = ChatOpenAI(temperature=1.0, model='gpt-3.5-turbo-16k')
9
 
10
  def predict(message, history):
@@ -16,4 +19,4 @@ def predict(message, history):
16
  gpt_response = llm(history_langchain_format)
17
  return gpt_response.content
18
 
19
- gr.ChatInterface(predict).launch()
 
5
 
6
  # os.environ["OPENAI_API_KEY"] = "sk-..." # Replace with your key
7
 
8
+ USERNAME = os.environ['USERNAME']
9
+ PASSWORD = os.environ['PASSWORD']
10
+
11
  llm = ChatOpenAI(temperature=1.0, model='gpt-3.5-turbo-16k')
12
 
13
  def predict(message, history):
 
19
  gpt_response = llm(history_langchain_format)
20
  return gpt_response.content
21
 
22
+ gr.ChatInterface(predict).launch(auth=(USERNAME, PASSWORD))