Spaces:
Sleeping
Sleeping
pedromsfaria
commited on
Commit
•
2d4d81d
1
Parent(s):
368a2f9
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ messages = [
|
|
41 |
),
|
42 |
}
|
43 |
]
|
44 |
-
prompt = "
|
45 |
|
46 |
def openai_create(user_input):
|
47 |
messages.append({"role": "user", "content": user_input})
|
@@ -71,16 +71,16 @@ def chatgpt_clone(input, history):
|
|
71 |
return history, history
|
72 |
|
73 |
|
74 |
-
block = gr.Blocks(css=".gradio-container {background: url('file=
|
75 |
|
76 |
|
77 |
with block:
|
78 |
-
gr.Markdown("""<h1><center>
|
79 |
""")
|
80 |
chatbot = gr.Chatbot()
|
81 |
message = gr.Textbox(placeholder=prompt)
|
82 |
state = gr.State()
|
83 |
-
submit = gr.Button("
|
84 |
submit.click(chatgpt_clone, inputs=[message, state], outputs=[chatbot, state])
|
85 |
|
86 |
block.launch(inline=False)
|
|
|
41 |
),
|
42 |
}
|
43 |
]
|
44 |
+
prompt = "Olá eu sou o TrueBot AI, o chatbot amigável da True Clinic.\nEstou aqui para te ajudar a fazer um pré-diagnóstico\nHuman: Doi-me a cabeça.\nAI: Quando começou a doer a cabeça? Pode elaborar?"
|
45 |
|
46 |
def openai_create(user_input):
|
47 |
messages.append({"role": "user", "content": user_input})
|
|
|
71 |
return history, history
|
72 |
|
73 |
|
74 |
+
block = gr.Blocks(css=".gradio-container {background: url('file=fundo.png')}")
|
75 |
|
76 |
|
77 |
with block:
|
78 |
+
gr.Markdown("""<h1><center>Truebot AI</center></h1>
|
79 |
""")
|
80 |
chatbot = gr.Chatbot()
|
81 |
message = gr.Textbox(placeholder=prompt)
|
82 |
state = gr.State()
|
83 |
+
submit = gr.Button("Enviar")
|
84 |
submit.click(chatgpt_clone, inputs=[message, state], outputs=[chatbot, state])
|
85 |
|
86 |
block.launch(inline=False)
|