Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
import os
|
2 |
import streamlit as st
|
3 |
from openai import OpenAI
|
4 |
-
from typing import List, Dict
|
|
|
5 |
import random
|
6 |
from dotenv import load_dotenv
|
7 |
|
@@ -31,12 +32,15 @@ st.markdown(f"""
|
|
31 |
<style>
|
32 |
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap');
|
33 |
|
|
|
|
|
|
|
|
|
34 |
.stApp {{
|
35 |
background: {get_cosmic_background()};
|
36 |
background-attachment: fixed;
|
37 |
background-size: cover;
|
38 |
color: white;
|
39 |
-
font-family: 'Orbitron', sans-serif;
|
40 |
}}
|
41 |
|
42 |
section[data-testid="stSidebar"] {{
|
@@ -51,6 +55,7 @@ st.markdown(f"""
|
|
51 |
backdrop-filter: blur(10px);
|
52 |
}}
|
53 |
|
|
|
54 |
.chat-message {{
|
55 |
background: rgba(255, 255, 255, 0.1);
|
56 |
border-radius: 10px;
|
@@ -64,6 +69,7 @@ st.markdown(f"""
|
|
64 |
box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
|
65 |
}}
|
66 |
|
|
|
67 |
.stTextInput > div > div > input {{
|
68 |
background: rgba(255, 255, 255, 0.1);
|
69 |
color: white;
|
@@ -71,6 +77,7 @@ st.markdown(f"""
|
|
71 |
border-radius: 10px;
|
72 |
}}
|
73 |
|
|
|
74 |
.stButton > button {{
|
75 |
background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
|
76 |
color: white;
|
@@ -78,6 +85,8 @@ st.markdown(f"""
|
|
78 |
padding: 10px 20px;
|
79 |
border-radius: 20px;
|
80 |
transition: all 0.3s ease;
|
|
|
|
|
81 |
}}
|
82 |
|
83 |
.stButton > button:hover {{
|
@@ -85,6 +94,7 @@ st.markdown(f"""
|
|
85 |
box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
|
86 |
}}
|
87 |
|
|
|
88 |
.cosmic-title {{
|
89 |
text-align: center;
|
90 |
font-size: 2.5rem;
|
@@ -92,6 +102,46 @@ st.markdown(f"""
|
|
92 |
color: white;
|
93 |
text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
|
94 |
animation: glow 2s ease-in-out infinite alternate;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
}}
|
96 |
|
97 |
@keyframes glow {{
|
@@ -104,18 +154,19 @@ st.markdown(f"""
|
|
104 |
}}
|
105 |
}}
|
106 |
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
}}
|
111 |
|
112 |
-
.
|
113 |
-
|
114 |
-
|
115 |
}}
|
116 |
|
117 |
-
|
118 |
-
|
|
|
119 |
}}
|
120 |
</style>
|
121 |
""", unsafe_allow_html=True)
|
|
|
1 |
import os
|
2 |
import streamlit as st
|
3 |
from openai import OpenAI
|
4 |
+
from typing import List, Dict
|
5 |
+
, Optional
|
6 |
import random
|
7 |
from dotenv import load_dotenv
|
8 |
|
|
|
32 |
<style>
|
33 |
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap');
|
34 |
|
35 |
+
* {{
|
36 |
+
font-family: 'Orbitron', sans-serif !important;
|
37 |
+
}}
|
38 |
+
|
39 |
.stApp {{
|
40 |
background: {get_cosmic_background()};
|
41 |
background-attachment: fixed;
|
42 |
background-size: cover;
|
43 |
color: white;
|
|
|
44 |
}}
|
45 |
|
46 |
section[data-testid="stSidebar"] {{
|
|
|
55 |
backdrop-filter: blur(10px);
|
56 |
}}
|
57 |
|
58 |
+
/* Chat message styling */
|
59 |
.chat-message {{
|
60 |
background: rgba(255, 255, 255, 0.1);
|
61 |
border-radius: 10px;
|
|
|
69 |
box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
|
70 |
}}
|
71 |
|
72 |
+
/* Input field styling */
|
73 |
.stTextInput > div > div > input {{
|
74 |
background: rgba(255, 255, 255, 0.1);
|
75 |
color: white;
|
|
|
77 |
border-radius: 10px;
|
78 |
}}
|
79 |
|
80 |
+
/* Button styling */
|
81 |
.stButton > button {{
|
82 |
background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
|
83 |
color: white;
|
|
|
85 |
padding: 10px 20px;
|
86 |
border-radius: 20px;
|
87 |
transition: all 0.3s ease;
|
88 |
+
text-transform: uppercase;
|
89 |
+
letter-spacing: 1px;
|
90 |
}}
|
91 |
|
92 |
.stButton > button:hover {{
|
|
|
94 |
box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
|
95 |
}}
|
96 |
|
97 |
+
/* Title styling */
|
98 |
.cosmic-title {{
|
99 |
text-align: center;
|
100 |
font-size: 2.5rem;
|
|
|
102 |
color: white;
|
103 |
text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
|
104 |
animation: glow 2s ease-in-out infinite alternate;
|
105 |
+
font-weight: 700;
|
106 |
+
}}
|
107 |
+
|
108 |
+
/* Header styling */
|
109 |
+
[data-testid="stHeader"] {{
|
110 |
+
background: rgba(0, 0, 0, 0.3);
|
111 |
+
backdrop-filter: blur(10px);
|
112 |
+
}}
|
113 |
+
|
114 |
+
/* Select box styling */
|
115 |
+
.stSelectbox label,
|
116 |
+
.stSelectbox div[data-baseweb="select"] span {{
|
117 |
+
color: white !important;
|
118 |
+
}}
|
119 |
+
|
120 |
+
/* Markdown text styling */
|
121 |
+
div[data-testid="stMarkdownContainer"] {{
|
122 |
+
color: white;
|
123 |
+
}}
|
124 |
+
|
125 |
+
/* Sidebar text */
|
126 |
+
.sidebar .sidebar-content {{
|
127 |
+
font-weight: 500;
|
128 |
+
}}
|
129 |
+
|
130 |
+
/* Chat input styling */
|
131 |
+
.stChatInputContainer {{
|
132 |
+
padding-bottom: 20px;
|
133 |
+
}}
|
134 |
+
|
135 |
+
/* Chat message text */
|
136 |
+
.stChatMessage {{
|
137 |
+
font-weight: 400;
|
138 |
+
letter-spacing: 0.5px;
|
139 |
+
}}
|
140 |
+
|
141 |
+
/* Spinner text */
|
142 |
+
.stSpinner {{
|
143 |
+
font-weight: 500;
|
144 |
+
letter-spacing: 1px;
|
145 |
}}
|
146 |
|
147 |
@keyframes glow {{
|
|
|
154 |
}}
|
155 |
}}
|
156 |
|
157 |
+
/* Additional elements */
|
158 |
+
button, input, optgroup, select, textarea {{
|
159 |
+
font-family: 'Orbitron', sans-serif !important;
|
160 |
}}
|
161 |
|
162 |
+
.streamlit-expanderHeader {{
|
163 |
+
font-family: 'Orbitron', sans-serif !important;
|
164 |
+
letter-spacing: 1px;
|
165 |
}}
|
166 |
|
167 |
+
.stAlert {{
|
168 |
+
font-family: 'Orbitron', sans-serif !important;
|
169 |
+
letter-spacing: 0.5px;
|
170 |
}}
|
171 |
</style>
|
172 |
""", unsafe_allow_html=True)
|