Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -97,12 +97,10 @@ def respond(
|
|
97 |
|
98 |
for message in client.chat.completions.create( #client.chat_completion(
|
99 |
messages=messages,
|
100 |
-
|
101 |
-
do_sample=True,
|
102 |
stream=True,
|
103 |
temperature=temperature,
|
104 |
top_p=top_p,
|
105 |
-
eos_token_id=terminators,
|
106 |
):
|
107 |
token = message.choices[0].delta.content
|
108 |
|
@@ -134,7 +132,7 @@ chatbot_main = gr.Chatbot(label="Extraction Output")
|
|
134 |
chatbot_main_input = gr.MultimodalTextbox({"text": "Choose the referred material(s) and ask your question.", "files":[]})
|
135 |
chatbot_sys_output = gr.Textbox(value="You are a friendly Chatbot.", label="System Message")
|
136 |
chatbot_max_tokens = gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max. New Tokens")
|
137 |
-
chatbot_temperature = gr.Slider(minimum=0.1, maximum=4.0, value=0.
|
138 |
chatbot_top_p = gr.Slider(
|
139 |
minimum=0.1,
|
140 |
maximum=1.0,
|
|
|
97 |
|
98 |
for message in client.chat.completions.create( #client.chat_completion(
|
99 |
messages=messages,
|
100 |
+
max_tokens=max_tokens,
|
|
|
101 |
stream=True,
|
102 |
temperature=temperature,
|
103 |
top_p=top_p,
|
|
|
104 |
):
|
105 |
token = message.choices[0].delta.content
|
106 |
|
|
|
132 |
chatbot_main_input = gr.MultimodalTextbox({"text": "Choose the referred material(s) and ask your question.", "files":[]})
|
133 |
chatbot_sys_output = gr.Textbox(value="You are a friendly Chatbot.", label="System Message")
|
134 |
chatbot_max_tokens = gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max. New Tokens")
|
135 |
+
chatbot_temperature = gr.Slider(minimum=0.1, maximum=4.0, value=0.1, step=0.1, label="Temperature")
|
136 |
chatbot_top_p = gr.Slider(
|
137 |
minimum=0.1,
|
138 |
maximum=1.0,
|