Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,6 @@ from langchain_core.messages import HumanMessage,SystemMessage,AIMessage
|
|
5 |
|
6 |
hf_token = os.getenv("HF_TOKEN")
|
7 |
|
8 |
-
deep_seek_model = HuggingFaceEndpoint(repo_id = 'deepseek-ai/DeepSeek-R1', provider = 'nebius', temperature = 0.7, max_new_tokens = 100, task ='conversational')
|
9 |
-
ds_model = ChatHuggingFace(llm = deep_seek_model, repo_id = 'deepseek-ai/DeepSeek-R1', provider = 'nebius', temperature = 0.7, max_new_tokens = 100, task ='conversational')
|
10 |
-
|
11 |
-
# st.title("ChatGenius Hub: Master Every Data Skills")
|
12 |
-
|
13 |
|
14 |
# Set the default page in session state
|
15 |
if "page" not in st.session_state:
|
@@ -28,8 +23,9 @@ if st.session_state.page == "home":
|
|
28 |
with col1:
|
29 |
if st.button("Python π"):
|
30 |
switch_page("python")
|
31 |
-
if st.button("
|
32 |
-
switch_page("
|
|
|
33 |
|
34 |
with col2:
|
35 |
if st.button("SQL π’οΈ"):
|
@@ -38,8 +34,8 @@ if st.session_state.page == "home":
|
|
38 |
switch_page("deeplearning")
|
39 |
|
40 |
with col3:
|
41 |
-
if st.button("
|
42 |
-
switch_page("
|
43 |
if st.button("Statistics π"):
|
44 |
switch_page("statistics")
|
45 |
|
@@ -71,39 +67,6 @@ elif st.session_state.page == "statistics":
|
|
71 |
st.button("β¬
οΈ Back to Home", on_click=lambda: switch_page("home"))
|
72 |
|
73 |
|
74 |
-
# message = [SystemMessage(content = "Answer like a data scientist"),
|
75 |
-
# HumanMessage(content = "Tell me about Support Vector")]
|
76 |
-
# result = ds_model.invoke(message)
|
77 |
-
# print(result.content)
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
# if "messages" not in st.session_state:
|
82 |
-
# st.session_state.messages = [
|
83 |
-
# SystemMessage(content="Answer like a data scientist")
|
84 |
-
# ]
|
85 |
-
|
86 |
-
# def generate_response(user_input):
|
87 |
-
# # Append user message
|
88 |
-
# st.session_state.messages.append(HumanMessage(content=user_input))
|
89 |
-
# # Invoke the model
|
90 |
-
# response = ds_model.invoke(st.session_state.messages)
|
91 |
-
# # Append AI response
|
92 |
-
# st.session_state.messages.append(AIMessage(content=response))
|
93 |
-
# return response
|
94 |
|
95 |
-
# # User input
|
96 |
-
# user_input = st.text_input("Ask a question about Data Science:")
|
97 |
|
98 |
-
# if user_input:
|
99 |
-
# with st.spinner("Getting answer..."):
|
100 |
-
# answer = generate_response(user_input)
|
101 |
-
# st.markdown(f"**Answer:** {answer}")
|
102 |
|
103 |
-
# # Display chat history
|
104 |
-
# if st.session_state.messages:
|
105 |
-
# for msg in st.session_state.messages[1:]: # skip initial SystemMessage
|
106 |
-
# if isinstance(msg, HumanMessage):
|
107 |
-
# st.markdown(f"**You:** {msg.content}")
|
108 |
-
# elif isinstance(msg, AIMessage):
|
109 |
-
# st.markdown(f"**Bot:** {msg.content}")
|
|
|
5 |
|
6 |
hf_token = os.getenv("HF_TOKEN")
|
7 |
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
# Set the default page in session state
|
10 |
if "page" not in st.session_state:
|
|
|
23 |
with col1:
|
24 |
if st.button("Python π"):
|
25 |
switch_page("python")
|
26 |
+
if st.button("Machine Learning π€"):
|
27 |
+
switch_page("ml")
|
28 |
+
|
29 |
|
30 |
with col2:
|
31 |
if st.button("SQL π’οΈ"):
|
|
|
34 |
switch_page("deeplearning")
|
35 |
|
36 |
with col3:
|
37 |
+
if st.button("Power BI π"):
|
38 |
+
switch_page("powerbi")
|
39 |
if st.button("Statistics π"):
|
40 |
switch_page("statistics")
|
41 |
|
|
|
67 |
st.button("β¬
οΈ Back to Home", on_click=lambda: switch_page("home"))
|
68 |
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
|
|
|
|
71 |
|
|
|
|
|
|
|
|
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|