Spaces:
Running
Running
a100 kh
commited on
Commit
•
b865247
1
Parent(s):
4f21439
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
-
from huggingface_hub import InferenceClient
|
3 |
from openai import OpenAI
|
4 |
|
5 |
# Modify OpenAI's API key and API base to use vLLM's API server.
|
@@ -37,7 +37,7 @@ def respond(
|
|
37 |
response = ""
|
38 |
|
39 |
for message in client.chat.completions.create(
|
40 |
-
|
41 |
messages=messages,
|
42 |
max_tokens=max_tokens,
|
43 |
stream=True,
|
|
|
1 |
import gradio as gr
|
2 |
+
# from huggingface_hub import InferenceClient
|
3 |
from openai import OpenAI
|
4 |
|
5 |
# Modify OpenAI's API key and API base to use vLLM's API server.
|
|
|
37 |
response = ""
|
38 |
|
39 |
for message in client.chat.completions.create(
|
40 |
+
model=model_name,
|
41 |
messages=messages,
|
42 |
max_tokens=max_tokens,
|
43 |
stream=True,
|