Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,20 +19,18 @@ def openai_chat(prompt):
|
|
| 19 |
message = completions.choices[0].text
|
| 20 |
return message.strip()
|
| 21 |
|
| 22 |
-
def chatbot(talk_to_chatsherman
|
| 23 |
output = openai_chat(talk_to_chatsherman)
|
| 24 |
-
|
| 25 |
-
return history, history
|
| 26 |
|
| 27 |
title = "ChatSherman"
|
| 28 |
description = "This is an AI chatbot powered by ShermanAI. Enter your question below to get started."
|
| 29 |
examples = [
|
| 30 |
-
["What is ChatSherman, and how does it work?"
|
| 31 |
-
["Is my personal information and data safe when I use the ChatSherman chatbot?"
|
| 32 |
-
["What are some common applications of deep learning in engineering?"
|
| 33 |
]
|
| 34 |
-
inputs =
|
| 35 |
-
outputs =
|
| 36 |
interface = gr.Interface(fn=chatbot, inputs=inputs, outputs=outputs, title=title, description=description, examples=examples)
|
| 37 |
-
interface.launch(
|
| 38 |
-
#try
|
|
|
|
| 19 |
message = completions.choices[0].text
|
| 20 |
return message.strip()
|
| 21 |
|
| 22 |
+
def chatbot(talk_to_chatsherman):
|
| 23 |
output = openai_chat(talk_to_chatsherman)
|
| 24 |
+
return output
|
|
|
|
| 25 |
|
| 26 |
title = "ChatSherman"
|
| 27 |
description = "This is an AI chatbot powered by ShermanAI. Enter your question below to get started."
|
| 28 |
examples = [
|
| 29 |
+
["What is ChatSherman, and how does it work?"],
|
| 30 |
+
["Is my personal information and data safe when I use the ChatSherman chatbot?"],
|
| 31 |
+
["What are some common applications of deep learning in engineering?"]
|
| 32 |
]
|
| 33 |
+
inputs = gr.inputs.Textbox(label="Talk to ChatSherman: ")
|
| 34 |
+
outputs = gr.outputs.Textbox(label="ChatSherman's response")
|
| 35 |
interface = gr.Interface(fn=chatbot, inputs=inputs, outputs=outputs, title=title, description=description, examples=examples)
|
| 36 |
+
interface.launch()
|
|
|