mirror of
https://github.com/benitomartin/scale-gke-qdrant-llama.git
synced 2025-12-17 02:54:25 +01:00
minor adjustments
This commit is contained in:
24
streamlit_app.py
Normal file
24
streamlit_app.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import streamlit as st
|
||||
import requests
|
||||
|
||||
# Set the FastAPI endpoint
|
||||
FASTAPI_ENDPOINT = "http://34.65.157.134:8000/query/"
|
||||
|
||||
# Streamlit app title
|
||||
st.title("Find Your Code")
|
||||
|
||||
# Input field for the query
|
||||
query = st.text_input("Query:")
|
||||
|
||||
# Button to submit the query
|
||||
if st.button("Get Response"):
|
||||
if query:
|
||||
response = requests.post(FASTAPI_ENDPOINT, json={"query": query})
|
||||
if response.status_code == 200:
|
||||
st.write(response.text)
|
||||
else:
|
||||
st.write("Error:", response.status_code)
|
||||
else:
|
||||
st.write("Please enter a query.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user