minor adjustments

This commit is contained in:
Benito Martin
2024-06-30 14:35:13 +02:00
parent 7e8688c556
commit 1f05738d09
6 changed files with 42 additions and 17 deletions

24
streamlit_app.py Normal file
View 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.")