Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def predict(system_msg, inputs, top_p, temperature, chat_counter, chatbot=[], hi
|
|
27 |
|
28 |
if chat_counter == 0 :
|
29 |
payload = {
|
30 |
-
"model": "gpt-
|
31 |
"messages": initial_message ,
|
32 |
"temperature" : 0.6,
|
33 |
"top_p":1.0,
|
@@ -54,7 +54,7 @@ def predict(system_msg, inputs, top_p, temperature, chat_counter, chatbot=[], hi
|
|
54 |
messages.append(temp)
|
55 |
#messages
|
56 |
payload = {
|
57 |
-
"model": "gpt-
|
58 |
"messages": messages, # Of the type of [{"role": "user", "content": f"{inputs}"}],
|
59 |
"temperature" : temperature, #1.0,
|
60 |
"top_p": top_p, #1.0,
|
@@ -116,7 +116,7 @@ system_msg_info = """The system message is used to set the context and behavior
|
|
116 |
theme = gr.themes.Soft(primary_hue="indigo", secondary_hue="blue", neutral_hue="blue",
|
117 |
text_size=gr.themes.sizes.text_lg)
|
118 |
|
119 |
-
with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;} #chatbot {height:
|
120 |
theme=theme) as demo:
|
121 |
gr.HTML(title)
|
122 |
gr.HTML("""<h3 align="center">🔥Thisc application provides AI assistance for Primary 6 Students 🎉🥳🎉🙌</h1>""")
|
|
|
27 |
|
28 |
if chat_counter == 0 :
|
29 |
payload = {
|
30 |
+
"model": "gpt-3.5-turbo",
|
31 |
"messages": initial_message ,
|
32 |
"temperature" : 0.6,
|
33 |
"top_p":1.0,
|
|
|
54 |
messages.append(temp)
|
55 |
#messages
|
56 |
payload = {
|
57 |
+
"model": "gpt-3.5-turbo",
|
58 |
"messages": messages, # Of the type of [{"role": "user", "content": f"{inputs}"}],
|
59 |
"temperature" : temperature, #1.0,
|
60 |
"top_p": top_p, #1.0,
|
|
|
116 |
theme = gr.themes.Soft(primary_hue="indigo", secondary_hue="blue", neutral_hue="blue",
|
117 |
text_size=gr.themes.sizes.text_lg)
|
118 |
|
119 |
+
with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;} #chatbot {height: 400px; overflow: auto;width: 600px;}""",
|
120 |
theme=theme) as demo:
|
121 |
gr.HTML(title)
|
122 |
gr.HTML("""<h3 align="center">🔥Thisc application provides AI assistance for Primary 6 Students 🎉🥳🎉🙌</h1>""")
|