Kunaal Naik commited on
Commit
566dfd9
·
1 Parent(s): 924d1ea

reset original

Browse files
Files changed (2) hide show
  1. app.py +11 -26
  2. app0.py → app2.py +26 -11
app.py CHANGED
@@ -3,9 +3,6 @@ from langchain_community.llms import OpenAI
3
  from langchain_core.prompts import PromptTemplate
4
  import streamlit as st
5
 
6
- # Set the page to wide mode
7
- st.set_page_config(layout="wide")
8
-
9
  mini_template = "You are an expert researcher. You\'ve talked to hundreds of {target_audience}. \
10
  Each person in the niche of {target_audience} has certain struggles that make it easier to sell {target_course}. \
11
  These are called Pain Points. There's a recipe for getting to the core of the Pain Points of {target_audience}. \
@@ -18,7 +15,7 @@ The Questions (answer each QUESTION 3 tiems in listicle format according to the
18
  "
19
 
20
 
21
- st.title("Marketing Technology")
22
 
23
  prompt = PromptTemplate(
24
  input_variables = ["target_audience", "target_course"],
@@ -27,32 +24,20 @@ prompt = PromptTemplate(
27
 
28
  chain = LLMChain(llm=OpenAI(), prompt=prompt)
29
 
30
- #target_audience = 'professionals looking for course on Power BI'
31
- #target_course = 'Zero to Hero in PowerBI'
32
 
33
- target_audience = st.sidebar.text_input('Enter your target audience', value = 'professionals looking for course on Power BI')
34
- target_course = st.sidebar.text_input('Enter your course name', value = 'Zero to Hero in PowerBI')
35
 
36
- if st.sidebar.button("Get response"):
37
- if target_audience and target_course:
38
  with st.spinner("Generating response..."):
39
-
40
- answer = chain.run({"target_audience": target_audience, "target_course": target_course})
41
-
42
- # Create a tab bar with 3 tabs
43
- tab1, tab2, tab3 = st.tabs(["Customer Pain Points", "LinkedIn Profile", "Customer Persona"])
44
-
45
- with tab1:
46
- with st.expander("Show prompt", expanded=False):
47
  st.info(prompt.template)
48
- st.write(answer)
49
-
50
- with tab2:
51
- st.write(answer)
52
-
53
- with tab3:
54
- st.write(answer)
55
-
56
  elif target_audience:
57
  st.error("Enter your course name.")
58
  elif my_course:
 
3
  from langchain_core.prompts import PromptTemplate
4
  import streamlit as st
5
 
 
 
 
6
  mini_template = "You are an expert researcher. You\'ve talked to hundreds of {target_audience}. \
7
  Each person in the niche of {target_audience} has certain struggles that make it easier to sell {target_course}. \
8
  These are called Pain Points. There's a recipe for getting to the core of the Pain Points of {target_audience}. \
 
15
  "
16
 
17
 
18
+ st.title("Saas Application")
19
 
20
  prompt = PromptTemplate(
21
  input_variables = ["target_audience", "target_course"],
 
24
 
25
  chain = LLMChain(llm=OpenAI(), prompt=prompt)
26
 
27
+ #target_audience = "professionals looking for course on Power BI"
28
+ #target_course = "Zero to Hero in PowerBI"
29
 
30
+ target_audience = st.text_input("Enter your target audience")
31
+ target_course = st.text_input("Enter your course name")
32
 
33
+ if st.button("Get resposne"):
34
+ if target_audience and my_course:
35
  with st.spinner("Generating response..."):
36
+ with st.expander("Show prompt", expanded=False):
 
 
 
 
 
 
 
37
  st.info(prompt.template)
38
+ answer = chain.run({"target_audience": target_audience, "target_course":target_course})
39
+
40
+ st.write(answer)
 
 
 
 
 
41
  elif target_audience:
42
  st.error("Enter your course name.")
43
  elif my_course:
app0.py → app2.py RENAMED
@@ -3,6 +3,9 @@ from langchain_community.llms import OpenAI
3
  from langchain_core.prompts import PromptTemplate
4
  import streamlit as st
5
 
 
 
 
6
  mini_template = "You are an expert researcher. You\'ve talked to hundreds of {target_audience}. \
7
  Each person in the niche of {target_audience} has certain struggles that make it easier to sell {target_course}. \
8
  These are called Pain Points. There's a recipe for getting to the core of the Pain Points of {target_audience}. \
@@ -15,7 +18,7 @@ The Questions (answer each QUESTION 3 tiems in listicle format according to the
15
  "
16
 
17
 
18
- st.title("Saas Application")
19
 
20
  prompt = PromptTemplate(
21
  input_variables = ["target_audience", "target_course"],
@@ -24,20 +27,32 @@ prompt = PromptTemplate(
24
 
25
  chain = LLMChain(llm=OpenAI(), prompt=prompt)
26
 
27
- #target_audience = "professionals looking for course on Power BI"
28
- #target_course = "Zero to Hero in PowerBI"
29
 
30
- target_audience = st.text_input("Enter your target audience")
31
- target_course = st.text_input("Enter your course name")
32
 
33
- if st.button("Get resposne"):
34
- if target_audience and my_course:
35
  with st.spinner("Generating response..."):
36
- with st.expander("Show prompt", expanded=False):
 
 
 
 
 
 
 
37
  st.info(prompt.template)
38
- answer = chain.run({"target_audience": target_audience, "target_course":target_course})
39
-
40
- st.write(answer)
 
 
 
 
 
41
  elif target_audience:
42
  st.error("Enter your course name.")
43
  elif my_course:
 
3
  from langchain_core.prompts import PromptTemplate
4
  import streamlit as st
5
 
6
+ # Set the page to wide mode
7
+ st.set_page_config(layout="wide")
8
+
9
  mini_template = "You are an expert researcher. You\'ve talked to hundreds of {target_audience}. \
10
  Each person in the niche of {target_audience} has certain struggles that make it easier to sell {target_course}. \
11
  These are called Pain Points. There's a recipe for getting to the core of the Pain Points of {target_audience}. \
 
18
  "
19
 
20
 
21
+ st.title("Marketing Technology")
22
 
23
  prompt = PromptTemplate(
24
  input_variables = ["target_audience", "target_course"],
 
27
 
28
  chain = LLMChain(llm=OpenAI(), prompt=prompt)
29
 
30
+ #target_audience = 'professionals looking for course on Power BI'
31
+ #target_course = 'Zero to Hero in PowerBI'
32
 
33
+ target_audience = st.sidebar.text_input('Enter your target audience', value = 'professionals looking for course on Power BI')
34
+ target_course = st.sidebar.text_input('Enter your course name', value = 'Zero to Hero in PowerBI')
35
 
36
+ if st.sidebar.button("Get response"):
37
+ if target_audience and target_course:
38
  with st.spinner("Generating response..."):
39
+
40
+ answer = chain.run({"target_audience": target_audience, "target_course": target_course})
41
+
42
+ # Create a tab bar with 3 tabs
43
+ tab1, tab2, tab3 = st.tabs(["Customer Pain Points", "LinkedIn Profile", "Customer Persona"])
44
+
45
+ with tab1:
46
+ with st.expander("Show prompt", expanded=False):
47
  st.info(prompt.template)
48
+ st.write(answer)
49
+
50
+ with tab2:
51
+ st.write(answer)
52
+
53
+ with tab3:
54
+ st.write(answer)
55
+
56
  elif target_audience:
57
  st.error("Enter your course name.")
58
  elif my_course: