Spaces:
Sleeping
Sleeping
Commit
•
7317f35
1
Parent(s):
4b4dd6c
Update app.py
Browse files
app.py
CHANGED
@@ -32,6 +32,27 @@ def send_message():
|
|
32 |
|
33 |
submit = gr.Button("SEND", onclick=send_message)
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
def chatgpt_clone(input, history):
|
37 |
history = history or []
|
|
|
32 |
|
33 |
submit = gr.Button("SEND", onclick=send_message)
|
34 |
|
35 |
+
block = gr.Interface(
|
36 |
+
fn=chatgpt_clone,
|
37 |
+
inputs=["text", "text"],
|
38 |
+
outputs=["text", "text"],
|
39 |
+
inputs_layout="vertical",
|
40 |
+
outputs_layout="vertical",
|
41 |
+
title="bhAI",
|
42 |
+
description="Talk to an AI assistant!",
|
43 |
+
theme="compact",
|
44 |
+
layout="vertical",
|
45 |
+
article="The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.",
|
46 |
+
examples=[
|
47 |
+
["Hello, who are you?", "I am an AI created by OpenAI. How can I help you today?"],
|
48 |
+
["What's the weather like?", "I'm not sure. Would you like me to look it up?"],
|
49 |
+
["What's your favorite color?", "I don't have a favorite color, but I like all the colors of the rainbow!"]
|
50 |
+
]
|
51 |
+
)
|
52 |
+
|
53 |
+
block.set_block(submit)
|
54 |
+
|
55 |
+
block.launch()
|
56 |
|
57 |
def chatgpt_clone(input, history):
|
58 |
history = history or []
|