Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,6 @@
|
|
1 |
-
# streamlit_app.py
|
2 |
-
|
3 |
import streamlit as st
|
4 |
from rag_engine import RAGEngine
|
5 |
|
6 |
-
|
7 |
st.title("🔮 Honkai Star Rail - Build Advisor (DeepSeek RAG)")
|
8 |
st.markdown("Ask me how to build any character, and I will tell you the **optimal setup**!")
|
9 |
|
@@ -17,8 +14,10 @@ if query:
|
|
17 |
st.write("Generating answer...")
|
18 |
with st.spinner("Consulting the Stellaron Hunters..."):
|
19 |
stream = rag.stream_answer(query)
|
20 |
-
response = st.empty()
|
21 |
text = ""
|
|
|
|
|
22 |
for chunk in stream:
|
23 |
-
text += chunk
|
24 |
-
response.markdown(text)
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
from rag_engine import RAGEngine
|
3 |
|
|
|
4 |
st.title("🔮 Honkai Star Rail - Build Advisor (DeepSeek RAG)")
|
5 |
st.markdown("Ask me how to build any character, and I will tell you the **optimal setup**!")
|
6 |
|
|
|
14 |
st.write("Generating answer...")
|
15 |
with st.spinner("Consulting the Stellaron Hunters..."):
|
16 |
stream = rag.stream_answer(query)
|
17 |
+
response = st.empty() # Create a container for streamed content
|
18 |
text = ""
|
19 |
+
|
20 |
+
# Stream and display each chunk as it comes in
|
21 |
for chunk in stream:
|
22 |
+
text += chunk # Add the chunk to the accumulated text
|
23 |
+
response.markdown(text) # Update the Streamlit app with the current text
|