from langchain_groq import ChatGroq import streamlit as st from langchain.prompts import PromptTemplate st.title('Gen AI_Doctor')#TITLE st.subheader("HERE YOU WILL FIND CAUSES AND TREATMENT FOR YOUR DIEASES....") LLM=ChatGroq(temperature=0.6, groq_api_key='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')#GEN AI MODEL from PIL import Image # Create a file uploader widget uploaded_file = st.file_uploader("Choose an Reports and Images...", type=["jpg", "jpeg", "png","PDF"," DOC/DOCX", "PDF","RTF","TXT","ODT"]) # Check if a file has been uploaded if uploaded_file is not None: # Open the image file image = Image.open(uploaded_file) # Display the image st.image(image, caption='Uploaded Image.', use_column_width=True) SUB=st.button('SUBMIT')#BUTTON B=PromptTemplate(input=['image'], template="""you are a doctor with 20 years of experience in this field, please go through the {image}uploaded image and classify to which it belongs and also tell me wheather it is effect to which disease and display it and also provide me the treatment and reasons for that disease""") if SUB: D=B.format(image=uploaded_file) E=LLM.invoke(D) st.write(E.content)