Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -35,56 +35,31 @@ def respond(
|
|
35 |
response += token
|
36 |
yield response
|
37 |
|
38 |
-
# Custom CSS to change the title color
|
39 |
opq = """
|
40 |
.gradio-container h1 {
|
41 |
-
color:
|
42 |
}
|
43 |
-
|
44 |
-
/* Add a footer for the copyright notice */
|
45 |
-
#custom-footer {
|
46 |
-
position: fixed;
|
47 |
-
bottom: 0;
|
48 |
-
width: 100%;
|
49 |
-
background-color: #f1f1f1;
|
50 |
-
text-align: center;
|
51 |
-
padding: 10px 0;
|
52 |
-
font-size: 14px;
|
53 |
-
color: #333;
|
54 |
-
z-index: 1000; /* Ensure the footer is above other elements */
|
55 |
-
}
|
56 |
-
"""
|
57 |
-
|
58 |
-
# HTML for the copyright notice
|
59 |
-
footer_html = """
|
60 |
-
<div id="custom-footer">
|
61 |
-
Rxle © 2021-2024.
|
62 |
-
</div>
|
63 |
"""
|
64 |
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
history.append((message, response[-1]))
|
84 |
-
return history, history
|
85 |
-
|
86 |
-
submit.click(update_chat, [message, chatbot, system_message, max_tokens, temperature, top_p], [chatbot, chatbot])
|
87 |
-
message.submit(update_chat, [message, chatbot, system_message, max_tokens, temperature, top_p], [chatbot, chatbot])
|
88 |
|
89 |
if __name__ == "__main__":
|
90 |
demo.launch(share=True)
|
|
|
35 |
response += token
|
36 |
yield response
|
37 |
|
38 |
+
# Custom CSS to change the title color
|
39 |
opq = """
|
40 |
.gradio-container h1 {
|
41 |
+
color: red !important;
|
42 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
"""
|
44 |
|
45 |
+
demo = gr.ChatInterface(
|
46 |
+
respond,
|
47 |
+
title="Welcome to Rxple Chat Bot",
|
48 |
+
description="Follow us on [Instagram](https://www.instagram.com/khellon_patel_21)",
|
49 |
+
additional_inputs=[
|
50 |
+
gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|
51 |
+
gr.Slider(minimum=1, maximum=2048, value=2048, step=1, label="Max new tokens"),
|
52 |
+
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
53 |
+
gr.Slider(
|
54 |
+
minimum=0.1,
|
55 |
+
maximum=1.0,
|
56 |
+
value=0.95,
|
57 |
+
step=0.05,
|
58 |
+
label="Top-p (nucleus sampling)",
|
59 |
+
),
|
60 |
+
],
|
61 |
+
css=opq # Add the custom CSS here
|
62 |
+
)
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
if __name__ == "__main__":
|
65 |
demo.launch(share=True)
|