aika42 commited on
Commit
c073f18
·
verified ·
1 Parent(s): aefe3f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -7
app.py CHANGED
@@ -1,16 +1,23 @@
1
- # app.py
 
2
  import streamlit as st
3
  from rag_engine import RAGEngine
4
 
5
- # Initialize app
6
- st.title("Honkai Star Rail Build Assistant 🔥")
7
 
8
  # Initialize RAG
9
  rag = RAGEngine()
10
 
11
- # User input
12
- query = st.text_input("Ask about a character build:")
13
 
14
  if query:
15
- response = rag.answer_query(query)
16
- st.write(response)
 
 
 
 
 
 
 
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)