Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def predict(openai_gpt4_key, system_msg, inputs, top_p, temperature, chat_counte
|
|
24 |
|
25 |
if chat_counter == 0 :
|
26 |
payload = {
|
27 |
-
"model": "gpt-4
|
28 |
"messages": initial_message ,
|
29 |
"temperature" : 1.0,
|
30 |
"top_p":1.0,
|
@@ -118,7 +118,7 @@ theme = gr.themes.Soft(primary_hue="zinc", secondary_hue="green", neutral_hue="g
|
|
118 |
with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;} #chatbot {height: 520px; overflow: auto;}""",
|
119 |
theme=theme) as demo:
|
120 |
gr.HTML(title)
|
121 |
-
gr.HTML("""<h3 align="center"
|
122 |
gr.HTML(theme_addon_msg)
|
123 |
gr.HTML('''<center><a href="https://huggingface.co/spaces/ysharma/ChatGPT4?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>Duplicate the Space and run securely with your OpenAI API Key</center>''')
|
124 |
|
@@ -130,7 +130,7 @@ with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;}
|
|
130 |
system_msg = gr.Textbox(label="Instruct the AI Assistant to set its beaviour", info = system_msg_info, value="",placeholder="Type here..")
|
131 |
accordion_msg = gr.HTML(value="🚧 To set System message you will have to refresh the app", visible=False)
|
132 |
|
133 |
-
chatbot = gr.Chatbot(label='GPT4', elem_id="chatbot")
|
134 |
inputs = gr.Textbox(placeholder= "Hi there!", label= "Type an input and press Enter")
|
135 |
state = gr.State([])
|
136 |
with gr.Row():
|
|
|
24 |
|
25 |
if chat_counter == 0 :
|
26 |
payload = {
|
27 |
+
"model": "gpt-4",
|
28 |
"messages": initial_message ,
|
29 |
"temperature" : 1.0,
|
30 |
"top_p":1.0,
|
|
|
118 |
with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;} #chatbot {height: 520px; overflow: auto;}""",
|
119 |
theme=theme) as demo:
|
120 |
gr.HTML(title)
|
121 |
+
gr.HTML("""<h3 align="center">🔥🔥This Huggingface Gradio Demo provides you access to GPT4 API with System Messages. Please note that you would be needing an OPENAI API key for GPT4 access🙌</h1>""")
|
122 |
gr.HTML(theme_addon_msg)
|
123 |
gr.HTML('''<center><a href="https://huggingface.co/spaces/ysharma/ChatGPT4?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>Duplicate the Space and run securely with your OpenAI API Key</center>''')
|
124 |
|
|
|
130 |
system_msg = gr.Textbox(label="Instruct the AI Assistant to set its beaviour", info = system_msg_info, value="",placeholder="Type here..")
|
131 |
accordion_msg = gr.HTML(value="🚧 To set System message you will have to refresh the app", visible=False)
|
132 |
|
133 |
+
chatbot = gr.Chatbot(label='GPT4.5', elem_id="chatbot")
|
134 |
inputs = gr.Textbox(placeholder= "Hi there!", label= "Type an input and press Enter")
|
135 |
state = gr.State([])
|
136 |
with gr.Row():
|