Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,3 @@
|
|
1 |
-
"""Gradio chat demo that streams responses from a (local) OpenAI‑compatible
|
2 |
-
endpoint using the official `openai` Python SDK. The server is assumed to be
|
3 |
-
running at http://0.0.0.0:8000 with the v1 REST routes. A custom header
|
4 |
-
`X‑MIXINPUTS‑BETA` is forwarded so MoI can adjust its blending strength at
|
5 |
-
runtime.
|
6 |
-
|
7 |
-
Launch with:
|
8 |
-
python app_openai.py
|
9 |
-
"""
|
10 |
-
|
11 |
from __future__ import annotations
|
12 |
|
13 |
import os
|
@@ -23,7 +13,7 @@ import server
|
|
23 |
# vLLM server that speaks the OpenAI REST dialect.
|
24 |
# -----------------------------------------------------------------------------
|
25 |
openai_api_key = "EMPTY"
|
26 |
-
openai_api_base = "http://
|
27 |
|
28 |
client = openai.OpenAI(
|
29 |
api_key=openai_api_key,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from __future__ import annotations
|
2 |
|
3 |
import os
|
|
|
13 |
# vLLM server that speaks the OpenAI REST dialect.
|
14 |
# -----------------------------------------------------------------------------
|
15 |
openai_api_key = "EMPTY"
|
16 |
+
openai_api_base = "http://0.0.0.0:8000/v1"
|
17 |
|
18 |
client = openai.OpenAI(
|
19 |
api_key=openai_api_key,
|