Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -92,7 +92,7 @@ def generate_follow_up(user_text):
|
|
92 |
"Ensure it's concise and structured exactly as requested without extra commentary."
|
93 |
)
|
94 |
|
95 |
-
hf = get_llm_hf_inference(max_new_tokens=30, temperature=0.
|
96 |
output = hf.invoke(input=prompt_text).strip()
|
97 |
|
98 |
# β
Extract relevant part, removing unwanted symbols
|
@@ -164,37 +164,23 @@ st.title("π HAL - NASA AI Assistant")
|
|
164 |
|
165 |
# β
Justify all chatbot responses
|
166 |
st.markdown("""
|
|
|
167 |
<style>
|
168 |
-
.user-msg {
|
169 |
-
background-color: #696969;
|
170 |
-
color: white;
|
171 |
padding: 10px;
|
172 |
border-radius: 10px;
|
173 |
margin-bottom: 5px;
|
174 |
width: fit-content;
|
175 |
max-width: 80%;
|
176 |
-
text-align: justify;
|
177 |
-
}
|
178 |
-
.assistant-msg {
|
179 |
-
background-color: #333333;
|
180 |
-
color: white;
|
181 |
-
padding: 10px;
|
182 |
-
border-radius: 10px;
|
183 |
-
margin-bottom: 5px;
|
184 |
-
width: fit-content;
|
185 |
-
max-width: 80%;
|
186 |
-
text-align: justify; /* β
Justify text */
|
187 |
-
}
|
188 |
-
.container {
|
189 |
-
display: flex;
|
190 |
-
flex-direction: column;
|
191 |
-
align-items: flex-start;
|
192 |
-
}
|
193 |
-
@media (max-width: 600px) {
|
194 |
-
.user-msg, .assistant-msg { font-size: 16px; max-width: 100%; }
|
195 |
}
|
|
|
|
|
|
|
|
|
196 |
</style>
|
197 |
""", unsafe_allow_html=True)
|
|
|
198 |
|
199 |
# β
Display Chat History
|
200 |
for message in st.session_state.chat_history:
|
|
|
92 |
"Ensure it's concise and structured exactly as requested without extra commentary."
|
93 |
)
|
94 |
|
95 |
+
hf = get_llm_hf_inference(max_new_tokens=30, temperature=0.3)
|
96 |
output = hf.invoke(input=prompt_text).strip()
|
97 |
|
98 |
# β
Extract relevant part, removing unwanted symbols
|
|
|
164 |
|
165 |
# β
Justify all chatbot responses
|
166 |
st.markdown("""
|
167 |
+
st.markdown("""
|
168 |
<style>
|
169 |
+
.user-msg, .assistant-msg {
|
|
|
|
|
170 |
padding: 10px;
|
171 |
border-radius: 10px;
|
172 |
margin-bottom: 5px;
|
173 |
width: fit-content;
|
174 |
max-width: 80%;
|
175 |
+
text-align: justify;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
}
|
177 |
+
.user-msg { background-color: #696969; color: white; }
|
178 |
+
.assistant-msg { background-color: #333333; color: white; }
|
179 |
+
.container { display: flex; flex-direction: column; align-items: flex-start; }
|
180 |
+
@media (max-width: 600px) { .user-msg, .assistant-msg { font-size: 16px; max-width: 100%; } }
|
181 |
</style>
|
182 |
""", unsafe_allow_html=True)
|
183 |
+
""", unsafe_allow_html=True)
|
184 |
|
185 |
# β
Display Chat History
|
186 |
for message in st.session_state.chat_history:
|