import streamlit as st import requests from PIL import Image from io import BytesIO st.title("AI Copilot for Primary Care Physicians") name = st.text_input("Enter your name:") prompt_file = st.file_uploader("Upload prompt file:") context_file = st.file_uploader("Upload context file:") if st.button("Submit"): if prompt_file and context_file: files = { "prompt": prompt_file.getvalue(), "file": context_file.getvalue(), } response = requests.post( "https://fastapi-gpt-v20.livelysmoke-91761759.centralus.azurecontainerapps.io/uploadPrompt", params={"name": name}, files=files, ) if response.status_code == 200: st.success("Files uploaded successfully!") else: st.error("Error uploading files.") else: st.warning("Please upload both files before submitting.")