sree4411 commited on
Commit
bfc965b
·
verified ·
1 Parent(s): 996f6bd

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +5 -5
src/streamlit_app.py CHANGED
@@ -1,4 +1,3 @@
1
-
2
  import os
3
  import streamlit as st
4
  from langchain.prompts import ChatPromptTemplate, SystemMessagePromptTemplate, HumanMessagePromptTemplate
@@ -26,7 +25,9 @@ if mentor_type:
26
  st.subheader(f"🧠 {mentor_type.upper()} Mentor Chat")
27
  experience = st.slider("Your experience (in years):", 0, 20, 1)
28
  user_input = st.text_input("Ask your question:")
29
- output_container = st.empty()
 
 
30
 
31
  if mentor_type == "python":
32
  model = HuggingFaceEndpoint(repo_id="meta-llama/Llama-3.1-8B-Instruct", provider="nebius", temperature=0.5, max_new_tokens=150, task="conversational")
@@ -40,7 +41,8 @@ output_container = st.empty()
40
  model = HuggingFaceEndpoint(repo_id="meta-llama/Llama-3.3-70B-Instruct", provider="nebius", temperature=0.5, max_new_tokens=150, task="conversational")
41
  elif mentor_type == "sql and powerbi":
42
  model = HuggingFaceEndpoint(repo_id="meta-llama/Meta-Llama-3-70B-Instruct", provider="hyperbolic", temperature=0.5, max_new_tokens=150, task="conversational")
43
- chat_model = ChatHuggingFace(
 
44
  llm=model,
45
  repo_id=model.repo_id,
46
  provider="nebius",
@@ -67,5 +69,3 @@ chat_model = ChatHuggingFace(
67
 
68
  if st.button("Clear Output"):
69
  output_container.empty()
70
- 
71
-
 
 
1
  import os
2
  import streamlit as st
3
  from langchain.prompts import ChatPromptTemplate, SystemMessagePromptTemplate, HumanMessagePromptTemplate
 
25
  st.subheader(f"🧠 {mentor_type.upper()} Mentor Chat")
26
  experience = st.slider("Your experience (in years):", 0, 20, 1)
27
  user_input = st.text_input("Ask your question:")
28
+
29
+
30
+ output_container = st.empty()
31
 
32
  if mentor_type == "python":
33
  model = HuggingFaceEndpoint(repo_id="meta-llama/Llama-3.1-8B-Instruct", provider="nebius", temperature=0.5, max_new_tokens=150, task="conversational")
 
41
  model = HuggingFaceEndpoint(repo_id="meta-llama/Llama-3.3-70B-Instruct", provider="nebius", temperature=0.5, max_new_tokens=150, task="conversational")
42
  elif mentor_type == "sql and powerbi":
43
  model = HuggingFaceEndpoint(repo_id="meta-llama/Meta-Llama-3-70B-Instruct", provider="hyperbolic", temperature=0.5, max_new_tokens=150, task="conversational")
44
+
45
+ chat_model = ChatHuggingFace(
46
  llm=model,
47
  repo_id=model.repo_id,
48
  provider="nebius",
 
69
 
70
  if st.button("Clear Output"):
71
  output_container.empty()