Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,8 @@ import gradio as gr
|
|
5 |
# openai.api_key = "sk-" # Replace with your key
|
6 |
|
7 |
OPENAI_API_KEY=os.getenv('OPENAI_API_KEY')
|
|
|
|
|
8 |
|
9 |
def predict(message, history):
|
10 |
history_openai_format = []
|
@@ -26,4 +28,4 @@ def predict(message, history):
|
|
26 |
partial_message = partial_message + chunk['choices'][0]['delta']['content']
|
27 |
yield partial_message
|
28 |
|
29 |
-
gr.ChatInterface(predict).queue().launch(auth=(
|
|
|
5 |
# openai.api_key = "sk-" # Replace with your key
|
6 |
|
7 |
OPENAI_API_KEY=os.getenv('OPENAI_API_KEY')
|
8 |
+
USER=os.getenv('USER')
|
9 |
+
PASS=os.getenv('PASS')
|
10 |
|
11 |
def predict(message, history):
|
12 |
history_openai_format = []
|
|
|
28 |
partial_message = partial_message + chunk['choices'][0]['delta']['content']
|
29 |
yield partial_message
|
30 |
|
31 |
+
gr.ChatInterface(predict).queue().launch(auth=(USER, PASS))
|