Spaces:
Sleeping
Sleeping
alwinvargheset@outlook.com commited on
Commit ·
3e532b2
1
Parent(s): ea8cba3
added chat-bot
Browse files- app.py +3 -3
- pages/1_Introduction Round.py +3 -3
- pages/2_Warm Up Round.py +3 -3
- pages/3_Interview Round.py +3 -3
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
-
from secret_key import openapi_key, groq_api_key
|
| 3 |
import os
|
| 4 |
from groq import Groq
|
| 5 |
from langchain_groq import ChatGroq
|
|
@@ -17,7 +17,7 @@ st.sidebar.markdown("Navigate using the options above")
|
|
| 17 |
#key = st.sidebar.text_input("Groq API Key ", type="password")
|
| 18 |
|
| 19 |
if "groq_key" not in st.session_state:
|
| 20 |
-
st.session_state.groq_key =
|
| 21 |
|
| 22 |
#if not key and not st.session_state.groq_key:
|
| 23 |
#st.sidebar.info("Please add your API key to continue")
|
|
@@ -26,7 +26,7 @@ if "groq_key" not in st.session_state:
|
|
| 26 |
#if key:
|
| 27 |
#st.session_state.groq_key = key
|
| 28 |
|
| 29 |
-
os.environ['GROQ_API_KEY'] = groq_api_key
|
| 30 |
llm = ChatGroq(
|
| 31 |
groq_api_key=groq_api_key,
|
| 32 |
model_name="mixtral-8x7b-32768"
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
#from secret_key import openapi_key, groq_api_key
|
| 3 |
import os
|
| 4 |
from groq import Groq
|
| 5 |
from langchain_groq import ChatGroq
|
|
|
|
| 17 |
#key = st.sidebar.text_input("Groq API Key ", type="password")
|
| 18 |
|
| 19 |
if "groq_key" not in st.session_state:
|
| 20 |
+
st.session_state.groq_key = os.getenv('GROQ_API_KEY')
|
| 21 |
|
| 22 |
#if not key and not st.session_state.groq_key:
|
| 23 |
#st.sidebar.info("Please add your API key to continue")
|
|
|
|
| 26 |
#if key:
|
| 27 |
#st.session_state.groq_key = key
|
| 28 |
|
| 29 |
+
#os.environ['GROQ_API_KEY'] = groq_api_key
|
| 30 |
llm = ChatGroq(
|
| 31 |
groq_api_key=groq_api_key,
|
| 32 |
model_name="mixtral-8x7b-32768"
|
pages/1_Introduction Round.py
CHANGED
|
@@ -5,7 +5,7 @@ from langchain.chains import LLMChain
|
|
| 5 |
import os
|
| 6 |
from langchain_groq import ChatGroq
|
| 7 |
|
| 8 |
-
from secret_key import groq_api_key
|
| 9 |
import pandas as pd
|
| 10 |
from langchain.schema import (AIMessage,HumanMessage,SystemMessage)
|
| 11 |
from langchain.prompts.chat import (
|
|
@@ -41,11 +41,11 @@ if "Resume Info" not in st.session_state or not st.session_state["Resume Info"]:
|
|
| 41 |
st.info("Please upload your Resume")
|
| 42 |
st.stop()
|
| 43 |
|
| 44 |
-
os.environ['GROQ_API_KEY'] = st.session_state.groq_key
|
| 45 |
|
| 46 |
# Initialize Groq client
|
| 47 |
client= ChatGroq(
|
| 48 |
-
groq_api_key=
|
| 49 |
model_name="mixtral-8x7b-32768"
|
| 50 |
)
|
| 51 |
memory = ConversationBufferMemory(
|
|
|
|
| 5 |
import os
|
| 6 |
from langchain_groq import ChatGroq
|
| 7 |
|
| 8 |
+
#from secret_key import groq_api_key
|
| 9 |
import pandas as pd
|
| 10 |
from langchain.schema import (AIMessage,HumanMessage,SystemMessage)
|
| 11 |
from langchain.prompts.chat import (
|
|
|
|
| 41 |
st.info("Please upload your Resume")
|
| 42 |
st.stop()
|
| 43 |
|
| 44 |
+
#os.environ['GROQ_API_KEY'] = st.session_state.groq_key
|
| 45 |
|
| 46 |
# Initialize Groq client
|
| 47 |
client= ChatGroq(
|
| 48 |
+
groq_api_key=os.getenv('GROQ_API_KEY'),
|
| 49 |
model_name="mixtral-8x7b-32768"
|
| 50 |
)
|
| 51 |
memory = ConversationBufferMemory(
|
pages/2_Warm Up Round.py
CHANGED
|
@@ -4,7 +4,7 @@ from langchain.prompts import PromptTemplate
|
|
| 4 |
from langchain.chains import LLMChain
|
| 5 |
import os
|
| 6 |
from langchain_groq import ChatGroq
|
| 7 |
-
from secret_key import groq_api_key
|
| 8 |
import pandas as pd
|
| 9 |
from langchain.schema import (AIMessage, HumanMessage, SystemMessage)
|
| 10 |
from langchain.prompts.chat import (
|
|
@@ -45,10 +45,10 @@ if not st.session_state["Job Description"]:
|
|
| 45 |
st.info("Please add your job description")
|
| 46 |
st.stop()
|
| 47 |
|
| 48 |
-
os.environ['GROQ_API_KEY'] = st.session_state.groq_key
|
| 49 |
|
| 50 |
client = ChatGroq(
|
| 51 |
-
groq_api_key=
|
| 52 |
model_name="mixtral-8x7b-32768"
|
| 53 |
)
|
| 54 |
### Extract previously asked Questions from the history
|
|
|
|
| 4 |
from langchain.chains import LLMChain
|
| 5 |
import os
|
| 6 |
from langchain_groq import ChatGroq
|
| 7 |
+
#from secret_key import groq_api_key
|
| 8 |
import pandas as pd
|
| 9 |
from langchain.schema import (AIMessage, HumanMessage, SystemMessage)
|
| 10 |
from langchain.prompts.chat import (
|
|
|
|
| 45 |
st.info("Please add your job description")
|
| 46 |
st.stop()
|
| 47 |
|
| 48 |
+
#os.environ['GROQ_API_KEY'] = st.session_state.groq_key
|
| 49 |
|
| 50 |
client = ChatGroq(
|
| 51 |
+
groq_api_key=os.getenv('GROQ_API_KEY'),
|
| 52 |
model_name="mixtral-8x7b-32768"
|
| 53 |
)
|
| 54 |
### Extract previously asked Questions from the history
|
pages/3_Interview Round.py
CHANGED
|
@@ -5,7 +5,7 @@ from langchain.chains import LLMChain
|
|
| 5 |
import os
|
| 6 |
from langchain_groq import ChatGroq
|
| 7 |
|
| 8 |
-
from secret_key import groq_api_key
|
| 9 |
import pandas as pd
|
| 10 |
from langchain.schema import (AIMessage, HumanMessage, SystemMessage)
|
| 11 |
from langchain.prompts.chat import (
|
|
@@ -48,11 +48,11 @@ if not st.session_state["Job Description"]:
|
|
| 48 |
st.info("Please add your job description")
|
| 49 |
st.stop()
|
| 50 |
|
| 51 |
-
os.environ['GROQ_API_KEY'] = st.session_state.groq_key
|
| 52 |
|
| 53 |
# Initialize Groq client with Mixtral model
|
| 54 |
client = ChatGroq(
|
| 55 |
-
groq_api_key=
|
| 56 |
model_name="mixtral-8x7b-32768"
|
| 57 |
)
|
| 58 |
### Extract previously asked Questions from the history
|
|
|
|
| 5 |
import os
|
| 6 |
from langchain_groq import ChatGroq
|
| 7 |
|
| 8 |
+
#from secret_key import groq_api_key
|
| 9 |
import pandas as pd
|
| 10 |
from langchain.schema import (AIMessage, HumanMessage, SystemMessage)
|
| 11 |
from langchain.prompts.chat import (
|
|
|
|
| 48 |
st.info("Please add your job description")
|
| 49 |
st.stop()
|
| 50 |
|
| 51 |
+
#os.environ['GROQ_API_KEY'] = st.session_state.groq_key
|
| 52 |
|
| 53 |
# Initialize Groq client with Mixtral model
|
| 54 |
client = ChatGroq(
|
| 55 |
+
groq_api_key=os.getenv('GROQ_API_KEY'),
|
| 56 |
model_name="mixtral-8x7b-32768"
|
| 57 |
)
|
| 58 |
### Extract previously asked Questions from the history
|