Update app.py
Browse files
app.py
CHANGED
|
@@ -20,4 +20,11 @@ if st.button("Generate Answer") and user_query.strip():
|
|
| 20 |
with st.spinner("Generating answer..."):
|
| 21 |
result = predictor.predict(user_query)
|
| 22 |
st.markdown("### Answer")
|
| 23 |
-
st.write(result)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
with st.spinner("Generating answer..."):
|
| 21 |
result = predictor.predict(user_query)
|
| 22 |
st.markdown("### Answer")
|
| 23 |
+
st.write(result)
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
if __name__ == "__main__":
|
| 27 |
+
import subprocess
|
| 28 |
+
import sys
|
| 29 |
+
print("You ran this file with `python app.py`, redirecting to `streamlit run app.py`...")
|
| 30 |
+
subprocess.run(["streamlit", "run", sys.argv[0]])
|