Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,16 +1,23 @@
|
|
1 |
-
#
|
|
|
2 |
import streamlit as st
|
3 |
from rag_engine import RAGEngine
|
4 |
|
5 |
-
|
6 |
-
st.
|
7 |
|
8 |
# Initialize RAG
|
9 |
rag = RAGEngine()
|
10 |
|
11 |
-
# User
|
12 |
-
query = st.text_input("
|
13 |
|
14 |
if query:
|
15 |
-
|
16 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# streamlit_app.py
|
2 |
+
|
3 |
import streamlit as st
|
4 |
from rag_engine import RAGEngine
|
5 |
|
6 |
+
st.title("🔮 Honkai Star Rail - Build Advisor (DeepSeek RAG)")
|
7 |
+
st.markdown("Ask me how to build any character, and I will tell you the **optimal setup**!")
|
8 |
|
9 |
# Initialize RAG
|
10 |
rag = RAGEngine()
|
11 |
|
12 |
+
# User Input
|
13 |
+
query = st.text_input("Enter your build question (e.g., How to build Jingliu?)")
|
14 |
|
15 |
if query:
|
16 |
+
st.write("Generating answer...")
|
17 |
+
with st.spinner("Consulting the Stellaron Hunters..."):
|
18 |
+
stream = rag.stream_answer(query)
|
19 |
+
response = st.empty()
|
20 |
+
text = ""
|
21 |
+
for chunk in stream:
|
22 |
+
text += chunk
|
23 |
+
response.markdown(text)
|