File size: 2,304 Bytes
424f861
 
 
f23e630
424f861
 
f23e630
424f861
 
f23e630
 
424f861
f23e630
424f861
 
f23e630
424f861
 
 
 
 
 
f23e630
424f861
f23e630
424f861
f23e630
424f861
a4db919
84af8aa
f23e630
 
 
 
 
 
 
 
 
 
84af8aa
24b0ab2
f23e630
 
9cacea7
f23e630
 
a2b8dd4
f23e630
 
a2b8dd4
f23e630
 
a2b8dd4
f23e630
 
9cacea7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import streamlit as st
from ai_assistant import ai_doctor_chat

# Display title
st.markdown("<h1 style='text-align: center;'>Your AI Doctor Using Your Custom Knowledge Base &#129302;</h1>", unsafe_allow_html=True)

# Create layout with two columns
left_column, right_column = st.columns([1, 3])

# Display image in the left column
left_column.image("ai_doctor_img.jpg", width=200, use_column_width="auto")

# Create a text input box for the OpenAI key
openai_key = right_column.text_input('Enter your OpenAI Key', type='password')

query = right_column.text_input('Enter your query', type='default')
submit = right_column.button('Submit')
if submit:
    if query and openai_key:
        try:
            with st.spinner('Processing your query...'):
                response = ai_doctor_chat(openai_key, query)
            right_column.write(response)
        except Exception as e:
            right_column.error(f'An error occurred: {e}', icon='🚨')
    else:
        right_column.error('Please enter your OpenAI key and Query both!', icon="🚨")

st.markdown("---")
st.write("Connect with me:")
# Define the URLs for the images you want to display
image_urls = {
        "kaggle": "https://www.kaggle.com/static/images/site-logo.svg",
        "linkedin": "URL_TO_YOUR_LINKEDIN_IMAGE",
        "google_scholar": "URL_TO_YOUR_GOOGLE_SCHOLAR_IMAGE",
        "youtube": "URL_TO_YOUR_YOUTUBE_IMAGE",
        "github": "URL_TO_YOUR_GITHUB_IMAGE"
    }

    # Create columns for each social profile link
kaggle, linkedin, google_scholar, youtube, github = st.columns(5)

    # For each column, display an image and a markdown link to a social profile
kaggle.image(image_urls["kaggle"], width=100)
kaggle.markdown("[Kaggle](https://www.kaggle.com/muhammadimran112233)")
    
linkedin.image(image_urls["linkedin"], width=100)
linkedin.markdown("[LinkedIn](https://www.linkedin.com/in/muhammad-imran-zaman)")
    
google_scholar.image(image_urls["google_scholar"], width=100)
google_scholar.markdown("[Google Scholar](https://scholar.google.com/citations?user=ulVFpy8AAAAJ&hl=en)")
    
youtube.image(image_urls["youtube"], width=100)
youtube.markdown("[YouTube](https://www.youtube.com/@consolioo)")
    
github.image(image_urls["github"], width=100)
github.markdown("[GitHub](https://github.com/Imran-ml)")