Clone77 commited on
Commit
693bbee
·
verified ·
1 Parent(s): c43f38c

Update pages/python.py

Browse files
Files changed (1) hide show
  1. pages/python.py +44 -1
pages/python.py CHANGED
@@ -1,2 +1,45 @@
1
  import streamlit as st
2
- st.write('Hi inside page')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
+
3
+
4
+
5
+
6
+
7
+
8
+ import os
9
+ import langchain
10
+ import langchain_huggingface
11
+ from langchain_huggingface import HuggingFaceEndpoint,HuggingFacePipeline,ChatHuggingFace
12
+
13
+ deep_seek_skeleton = HuggingFaceEndpoint(repo_id='meta-llama/Llama-3.2-3B-Instruct',
14
+ provider = 'sambanova',
15
+ temperature=0.7,
16
+ max_new_tokens=150,
17
+ task = 'conversational')
18
+ deep_seek = ChatHuggingFace(llm=deep_seek_skeleton,
19
+ repo_id='meta-llama/Llama-3.2-3B-Instruct',
20
+ provider = 'sambanova',
21
+ temperature=0.7,
22
+ max_new_tokens=150,
23
+ task = 'conversational')
24
+
25
+ exp = ['<1', '1', '2', '3', '4', '5', '5+']
26
+ if exp == '<1':
27
+ experince = 'New bie mentor'
28
+ elif exp == '1':
29
+ experince = '1'
30
+ elif exp == '2':
31
+ experince = '2'
32
+ elif exp == '3':
33
+ experince = '3'
34
+ elif exp == '4':
35
+ experince = '4'
36
+ elif exp == '5':
37
+ experince = '5'
38
+ elif exp == '5+'
39
+ experince = 'professional'
40
+ user_input = st.text_input("Enter your query:")
41
+
42
+
43
+
44
+ message = [SystemMessage(content='act as expert for creating a dashboard in streamlit using hugging face'),
45
+ HumanMessage(content=user_input)]