import streamlit as st import httpx st.title("Kivy Chatbot Backend") user_input = st.text_input("Ask a question:") if st.button("Get Response"): if user_input: # Make a POST request to the FastAPI /predict endpoint url = "http://localhost:8000/predict" # Assuming FastAPI is running locally or use the correct URL response = httpx.post(url, json={"input": user_input}) bot_response = response.json().get("response", "No response found") st.write(f"Response: {bot_response}")