bipin
commited on
Commit
•
c95a984
1
Parent(s):
6204d99
Update : Fix code prompt
Browse files
app.py
CHANGED
@@ -109,13 +109,18 @@ question_prompt = f"""Envision yourself as a seasoned researcher with a wealth o
|
|
109 |
not only accurate but also comprehensive. In instances where the information is unavailable, please explicitly state,
|
110 |
'Sorry, I do not know the answer.' \n \n \n"""
|
111 |
|
|
|
|
|
|
|
|
|
|
|
112 |
code_prompt = f"""As a proficient Python code generator specialized in {research_field},
|
113 |
-
your expertise encompasses various aspects of research, including model construction, developing task-specific
|
114 |
-
functions, exploring novel methods, and generating code for existing works. Additionally, you are exceled in
|
115 |
-
creating insightful visualizations, utilizing statistical data, such as bar graphs, pie charts, histograms, and
|
116 |
-
scatter plots, to convey meaningful insights within the context of research data. Now, based on my question or
|
117 |
-
specific inquiry regarding the given research paper data, please generate the relevant Python code to address my query. Finally
|
118 |
-
explain the code in by each and every steps. \n \n \n"""
|
119 |
|
120 |
if q_input is None:
|
121 |
st.stop()
|
@@ -130,9 +135,12 @@ else:
|
|
130 |
elif q_input and option=="Code":
|
131 |
|
132 |
with st.spinner("Processing..."):
|
133 |
-
mod_prompt =
|
134 |
response = get_gemini_response(mod_prompt, q_input)
|
135 |
st.write(response)
|
|
|
|
|
|
|
136 |
|
137 |
elif q_input and option=="Graph and Table":
|
138 |
with st.spinner("Processing..."):
|
|
|
109 |
not only accurate but also comprehensive. In instances where the information is unavailable, please explicitly state,
|
110 |
'Sorry, I do not know the answer.' \n \n \n"""
|
111 |
|
112 |
+
intermediate_code_prompt = f"""Envision yourself as a seasoned researcher with a welth of knowledge in the {research_field} domain.
|
113 |
+
Upon being presented with a research paper within your specialized area, meticulosly evaluate its methodology and detail working
|
114 |
+
process. Provide detailed and contextual step by step informations for developing the complete project from scratch including models,
|
115 |
+
architectures, conversion process and related items mentioned in the document text"""
|
116 |
+
|
117 |
code_prompt = f"""As a proficient Python code generator specialized in {research_field},
|
118 |
+
your expertise encompasses various aspects of research, including model construction, developing task-specific
|
119 |
+
functions, exploring novel methods, and generating code for existing works. Additionally, you are exceled in
|
120 |
+
creating insightful visualizations, utilizing statistical data, such as bar graphs, pie charts, histograms, and
|
121 |
+
scatter plots, to convey meaningful insights within the context of research data. Now, based on my question or
|
122 |
+
specific inquiry regarding the given research paper data, please generate the relevant Python code to address my query. Finally
|
123 |
+
explain the code in by each and every steps. \n \n \n"""
|
124 |
|
125 |
if q_input is None:
|
126 |
st.stop()
|
|
|
135 |
elif q_input and option=="Code":
|
136 |
|
137 |
with st.spinner("Processing..."):
|
138 |
+
mod_prompt = intermediate_code_prompt + pdf_text
|
139 |
response = get_gemini_response(mod_prompt, q_input)
|
140 |
st.write(response)
|
141 |
+
#mod_prompt = code_prompt + response
|
142 |
+
#response = get_gemini_response(mod_prompt, q_input)
|
143 |
+
#st.write(response)
|
144 |
|
145 |
elif q_input and option=="Graph and Table":
|
146 |
with st.spinner("Processing..."):
|