Spaces:
Runtime error
Runtime error
| import streamlit as st | |
| from streamlit_option_menu import option_menu | |
| from app_utils import switch_page | |
| from PIL import Image | |
| from streamlit_lottie import st_lottie | |
| from typing import Literal | |
| from dataclasses import dataclass | |
| import json | |
| import base64 | |
| from langchain.memory import ConversationBufferMemory | |
| from langchain.chains import ConversationChain, RetrievalQA | |
| from langchain.prompts.prompt import PromptTemplate | |
| from langchain.text_splitter import NLTKTextSplitter | |
| from langchain.vectorstores import FAISS | |
| import nltk | |
| from prompts.prompts import templates | |
| from langchain_google_genai import ChatGoogleGenerativeAI | |
| import getpass | |
| import os | |
| from langchain_google_genai import GoogleGenerativeAIEmbeddings | |
| if "GOOGLE_API_KEY" not in os.environ: | |
| os.environ["GOOGLE_API_KEY"] = "AIzaSyCA4__JMC_ZIQ9xQegIj5LOMLhSSrn3pMw" | |
| im = Image.open("icon.png") | |
| def app(): | |
| home_title = "AI Interviewer" | |
| st.markdown( | |
| "<style>#MainMenu{visibility:hidden;}</style>", | |
| unsafe_allow_html=True | |
| ) | |
| st.image(im, width=100) | |
| st.markdown(f"""# {home_title}""", unsafe_allow_html=True) | |
| st.markdown("""\n""") | |
| # st.markdown("#### Greetings") | |
| st.markdown("Welcome to AI Interviewer! 👏 AI Interviewer is your personal interviewer powered by generative AI that conducts mock interviews." | |
| "You can upload your resume and enter job descriptions, and AI Interviewer will ask you customized questions. Additionally, you can configure your own Interviewer!") | |
| st.markdown("""\n""") | |
| jd = st.text_input("Enter your role") | |
| certification_name = st.text_input("Certification name", "") | |
| certification_link = st.text_input("Certification link", "") | |
| if certification_name: | |
| with open("certification_data.json", "w") as f: | |
| json.dump(certification_name, f) | |
| st.success("Certification data saved successfully!") | |
| if jd: | |
| with open("job_description.json", "w") as f: | |
| json.dump(jd, f) | |
| st.success("Job description saved successfully!") |