bipin
commited on
Commit
•
6204d99
1
Parent(s):
dad83ab
Update: Custom Prompting feature implementation
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ with st.sidebar:
|
|
36 |
st.title("Upload PDF:")
|
37 |
research_field = st.text_input("Research Field: ",key="research_field", placeholder="Enter research fields with commas")
|
38 |
uploaded_file = st.file_uploader("", type=["pdf"])
|
39 |
-
option = st.selectbox('Select Mode', ('', 'Chat', 'Graph and Table', 'Code'))
|
40 |
#print(option)
|
41 |
#submit = st.button("Submit", type="primary")
|
42 |
#submit1 = st.button("Resume Assesmet")
|
@@ -139,6 +139,11 @@ else:
|
|
139 |
#mod_prompt = code_prompt + pdf_text
|
140 |
#response = get_gemini_response(mod_prompt, q_input)
|
141 |
st.write("Graph and Table mode is not developed yet.")
|
|
|
|
|
|
|
|
|
|
|
142 |
|
143 |
else:
|
144 |
st.write(f"{option} Mode")
|
|
|
36 |
st.title("Upload PDF:")
|
37 |
research_field = st.text_input("Research Field: ",key="research_field", placeholder="Enter research fields with commas")
|
38 |
uploaded_file = st.file_uploader("", type=["pdf"])
|
39 |
+
option = st.selectbox('Select Mode', ('', 'Chat', 'Graph and Table', 'Code', 'Custom Prompting'))
|
40 |
#print(option)
|
41 |
#submit = st.button("Submit", type="primary")
|
42 |
#submit1 = st.button("Resume Assesmet")
|
|
|
139 |
#mod_prompt = code_prompt + pdf_text
|
140 |
#response = get_gemini_response(mod_prompt, q_input)
|
141 |
st.write("Graph and Table mode is not developed yet.")
|
142 |
+
|
143 |
+
elif q_input and option == "Custom Prompting":
|
144 |
+
mod_prompt = q_input
|
145 |
+
response = get_gemini_response(mod_prompt, pdf_text)
|
146 |
+
st.write(response)
|
147 |
|
148 |
else:
|
149 |
st.write(f"{option} Mode")
|