Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,9 @@ import os
|
|
2 |
from openai import OpenAI
|
3 |
import gradio as gr
|
4 |
|
5 |
-
|
|
|
|
|
6 |
|
7 |
def predict(message, history):
|
8 |
history_openai_format = []
|
|
|
2 |
from openai import OpenAI
|
3 |
import gradio as gr
|
4 |
|
5 |
+
api_key = os.environ.get("OPENAI_API_KEY")
|
6 |
+
base_url = os.environ.get("OPENAI_BASE_URL")
|
7 |
+
client = OpenAI(api_key=api_key, base_url=base_url)
|
8 |
|
9 |
def predict(message, history):
|
10 |
history_openai_format = []
|