Spaces:
Sleeping
Sleeping
Commit
•
9243a04
1
Parent(s):
7fb5dd6
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from langchain_community.llms import OpenAI
|
|
5 |
|
6 |
st.title("ask me anything!")
|
7 |
|
8 |
-
def
|
9 |
# Enhanced prompt with additional context for better post generation
|
10 |
prompt = topic
|
11 |
llm = OpenAI(temperature=0.7, openai_api_key=st.secrets["OPENAI_API_KEY"])
|
@@ -13,11 +13,11 @@ def generate_linkedin_post(topic):
|
|
13 |
return response
|
14 |
|
15 |
with st.form("my_form"):
|
16 |
-
topic = st.text_area("
|
17 |
|
18 |
-
submitted = st.form_submit_button("
|
19 |
if submitted and topic:
|
20 |
-
post =
|
21 |
st.info(post)
|
22 |
elif submitted and not topic:
|
23 |
st.error("Please enter a topic to generate a post.")
|
|
|
5 |
|
6 |
st.title("ask me anything!")
|
7 |
|
8 |
+
def mathematics(topic):
|
9 |
# Enhanced prompt with additional context for better post generation
|
10 |
prompt = topic
|
11 |
llm = OpenAI(temperature=0.7, openai_api_key=st.secrets["OPENAI_API_KEY"])
|
|
|
13 |
return response
|
14 |
|
15 |
with st.form("my_form"):
|
16 |
+
topic = st.text_area("mathematics with dipanwita")
|
17 |
|
18 |
+
submitted = st.form_submit_button("Ask dilip")
|
19 |
if submitted and topic:
|
20 |
+
post = mathematics(topic)
|
21 |
st.info(post)
|
22 |
elif submitted and not topic:
|
23 |
st.error("Please enter a topic to generate a post.")
|