File size: 5,218 Bytes
5cee749 fdb52c6 0d07918 daf8b2f bf89939 22c6e02 daf8b2f b141ec0 5cee749 5d8545a bf89939 5d8545a bf89939 5d8545a 5cee749 5d8545a 5cee749 daf8b2f 5cee749 b060585 5cee749 5d8545a 5cee749 5d8545a 5cee749 5d8545a 5cee749 5d8545a 719aaf3 5cee749 81c9a4d 1fcad2d fdb52c6 15bb841 fdb52c6 2a95f27 15bb841 2a95f27 5cee749 2a95f27 15bb841 2a95f27 0d82915 2a95f27 5cee749 fdb52c6 5cee749 |
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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
import streamlit as st
from function import GetLLMResponse
from langchain_community.llms import OpenAI
from langchain_google_genai import ChatGoogleGenerativeAI
# Page configuration
st.set_page_config(page_title="Interview Practice Bot",
page_icon="📚",
layout="wide",
initial_sidebar_state="collapsed")
def main():
roles_and_topics = {
"Front-End Developer": ["HTML/CSS", "JavaScript and Frameworks (React, Angular, Vue.js)", "Responsive Design", "Browser Compatibility"],
"Back-End Developer": ["Server-Side Languages (Node.js, Python, Ruby, PHP)", "Database Management (SQL, NoSQL)", "API Development", "Server and Hosting Management"],
"Full-Stack Developer": ["Combination of Front-End and Back-End Topics", "Integration of Systems", "DevOps Basics"],
"Mobile Developer": ["Android Development (Java, Kotlin)", "iOS Development (Swift, Objective-C)", "Cross-Platform Development (Flutter, React Native)"],
"Data Scientist": ["Statistical Analysis", "Machine Learning Algorithms", "Data Wrangling and Cleaning", "Data Visualization"],
"Data Analyst": ["Data Collection and Processing", "SQL and Database Querying", "Data Visualization Tools (Tableau, Power BI)", "Basic Statistics"],
"Machine Learning Engineer": ["Supervised and Unsupervised Learning", "Model Deployment", "Deep Learning", "Natural Language Processing"],
"DevOps Engineer": ["Continuous Integration/Continuous Deployment (CI/CD)", "Containerization (Docker, Kubernetes)", "Infrastructure as Code (Terraform, Ansible)", "Cloud Platforms (AWS, Azure, Google Cloud)"],
"Cloud Engineer": ["Cloud Architecture", "Cloud Services (Compute, Storage, Networking)", "Security in the Cloud", "Cost Management"],
"Cybersecurity Analyst": ["Threat Detection and Mitigation", "Security Protocols and Encryption", "Network Security", "Incident Response"],
"Penetration Tester": ["Vulnerability Assessment", "Ethical Hacking Techniques", "Security Tools (Metasploit, Burp Suite)", "Report Writing and Documentation"],
"Project Manager": ["Project Planning and Scheduling", "Risk Management", "Agile and Scrum Methodologies", "Stakeholder Communication"],
"UX/UI Designer": ["User Research", "Wireframing and Prototyping", "Design Principles", "Usability Testing"],
"Quality Assurance (QA) Engineer": ["Testing Methodologies", "Automation Testing", "Bug Tracking", "Performance Testing"],
"Blockchain Developer": ["Blockchain Fundamentals", "Smart Contracts", "Cryptographic Algorithms", "Decentralized Applications (DApps)"],
"Digital Marketing Specialist": ["SEO/SEM", "Social Media Marketing", "Content Marketing", "Analytics and Reporting"],
"AI Research Scientist": ["AI Theory", "Algorithm Development", "Neural Networks", "Natural Language Processing"],
"AI Engineer": ["AI Model Deployment", "Machine Learning Engineering", "Deep Learning", "AI Tools and Frameworks"],
"Generative AI Specialist (GenAI)": ["Generative Models", "GANs (Generative Adversarial Networks)", "Creative AI Applications", "Ethics in AI"],
"Generative Business Intelligence Specialist (GenBI)": ["Automated Data Analysis", "Business Intelligence Tools", "Predictive Analytics", "AI in Business Strategy"]
}
st.header("Select AI:")
model = st.radio("Model", [ "Gemini","Open AI",])
st.write("Selected option:", model)
# Header and description
st.title("Interview Practice Bot 📚")
st.text("Choose the role and topic for your Interview.")
# User input for quiz generation
## Layout in columns
col1, col2, col3 = st.columns([1, 1, 1])
with col1:
selected_topic_level = st.selectbox('Select Role', list(roles_and_topics.keys()))
with col2:
selected_topic = st.selectbox('Select Topic', roles_and_topics[selected_topic_level])
with col3:
num_quizzes = st.slider('Number of Questions', min_value=1, max_value= 10, value=1)
submit = st.button('Generate Questions')
# Final Response
if submit:
questions,answers = GetLLMResponse(selected_topic_level, selected_topic, num_quizzes, model)
with st.spinner("Generating Quizzes..."):
questions,answers = GetLLMResponse(selected_topic_level, selected_topic, num_quizzes, model)
st.success("Quizzes Generated!")
# Display questions and answers in a table
if questions:
st.subheader("Quiz Questions and Answers:")
# Prepare data for the table
col1, col2 = st.columns(2)
with col1:
st.subheader("Questions")
st.write(questions)
with col2:
st.subheader("Answers")
st.write(answers)
else:
st.warning("No Quiz Questions and Answers")
else:
st.warning("Click the 'Generate Quizzes' button to create quizzes.")
if __name__ == "__main__":
main() |