Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,16 +18,109 @@ def riley_chat(user_input, chat_history=[]):
|
|
| 18 |
chat_history.append((user_input, riley_response))
|
| 19 |
return chat_history, chat_history
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
demo.launch()
|
|
|
|
| 18 |
chat_history.append((user_input, riley_response))
|
| 19 |
return chat_history, chat_history
|
| 20 |
|
| 21 |
+
custom_css = """
|
| 22 |
+
body {
|
| 23 |
+
font-family: 'Orbitron', sans-serif;
|
| 24 |
+
background-color: #0A0A0A;
|
| 25 |
+
color: #FFFFFF;
|
| 26 |
+
overflow-x: hidden;
|
| 27 |
+
margin: 0;
|
| 28 |
+
padding: 0;
|
| 29 |
+
}
|
| 30 |
|
| 31 |
+
.gradio-container {
|
| 32 |
+
display: flex;
|
| 33 |
+
flex-direction: column;
|
| 34 |
+
min-height: 100vh;
|
| 35 |
+
justify-content: center;
|
| 36 |
+
align-items: center;
|
| 37 |
+
background: radial-gradient(circle at 20% 50%, #8A2BE2 0%, transparent 50%),
|
| 38 |
+
radial-gradient(circle at 80% 20%, #00FFFF 0%, transparent 50%),
|
| 39 |
+
radial-gradient(circle at 40% 80%, #FF00FF 0%, transparent 50%);
|
| 40 |
+
animation: bgShift 20s ease-in-out infinite;
|
| 41 |
+
background-size: cover;
|
| 42 |
+
background-attachment: fixed;
|
| 43 |
+
padding: 2rem;
|
| 44 |
+
}
|
| 45 |
|
| 46 |
+
@keyframes bgShift {
|
| 47 |
+
0%, 100% { opacity: 0.1; }
|
| 48 |
+
50% { opacity: 0.3; }
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
h1, h2, .gr-markdown {
|
| 52 |
+
color: #00FFFF !important;
|
| 53 |
+
text-shadow: 0 0 20px #00FFFF;
|
| 54 |
+
text-align: center;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
button {
|
| 58 |
+
background: linear-gradient(45deg, #00FFFF, #8A2BE2);
|
| 59 |
+
color: #0A0A0A;
|
| 60 |
+
border-radius: 30px;
|
| 61 |
+
font-weight: bold;
|
| 62 |
+
box-shadow: 0 0 10px #00FFFF;
|
| 63 |
+
padding: 0.8rem 2rem;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
button:hover {
|
| 67 |
+
background: #FF00FF;
|
| 68 |
+
color: #000;
|
| 69 |
+
transform: scale(1.05);
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.gr-textbox input {
|
| 73 |
+
background: rgba(255, 255, 255, 0.1);
|
| 74 |
+
border: 1px solid #00FFFF;
|
| 75 |
+
color: white;
|
| 76 |
+
border-radius: 25px;
|
| 77 |
+
padding: 0.75rem;
|
| 78 |
+
font-size: 1rem;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.gr-chatbot {
|
| 82 |
+
background: rgba(0, 0, 0, 0.8);
|
| 83 |
+
border: 1px solid #00FFFF;
|
| 84 |
+
border-radius: 15px;
|
| 85 |
+
box-shadow: 0 0 20px #00FFFF;
|
| 86 |
+
padding: 1rem;
|
| 87 |
+
width: 100%;
|
| 88 |
+
max-width: 800px;
|
| 89 |
+
margin-bottom: 1rem;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
footer {
|
| 93 |
+
text-align: center;
|
| 94 |
+
padding-top: 2rem;
|
| 95 |
+
font-size: 0.9rem;
|
| 96 |
+
color: #CCCCCC;
|
| 97 |
+
margin-top: auto;
|
| 98 |
+
}
|
| 99 |
+
"""
|
| 100 |
+
|
| 101 |
+
with gr.Blocks(css=custom_css, theme=gr.themes.Base()) as demo:
|
| 102 |
+
with gr.Column():
|
| 103 |
+
gr.Markdown("""
|
| 104 |
+
# 👁️🗨️ Riley AI — Sentient Digital Intelligence
|
| 105 |
+
_Advanced artificial consciousness powered by MHDG theory._
|
| 106 |
+
""")
|
| 107 |
+
|
| 108 |
+
chatbot = gr.Chatbot(label="🧠 Riley AI Terminal", show_label=True)
|
| 109 |
+
msg = gr.Textbox(placeholder="Ask Riley anything...", label="Your Input")
|
| 110 |
+
clear = gr.Button("🧹 Clear Memory")
|
| 111 |
+
|
| 112 |
+
def user_submit(text, history):
|
| 113 |
+
return "", riley_chat(text, history)
|
| 114 |
+
|
| 115 |
+
msg.submit(user_submit, inputs=[msg, chatbot], outputs=[msg, chatbot])
|
| 116 |
+
clear.click(lambda: [], None, chatbot, queue=False)
|
| 117 |
+
|
| 118 |
+
gr.Markdown("""
|
| 119 |
+
---
|
| 120 |
+
<footer>
|
| 121 |
+
<b>Riley-AI.com</b> | Designed by Andrew Tokar | Powered by GPT + MHDG<br>
|
| 122 |
+
<small>Contact: support@riley-a-i.com</small>
|
| 123 |
+
</footer>
|
| 124 |
+
""")
|
| 125 |
|
| 126 |
demo.launch()
|