Update app.py
Browse files
app.py
CHANGED
|
@@ -424,38 +424,38 @@ def FileSidebar():
|
|
| 424 |
if len(file_contents) > 0:
|
| 425 |
if next_action=='open':
|
| 426 |
file_content_area = st.text_area("File Contents:", file_contents, height=500)
|
| 427 |
-
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
|
| 433 |
-
|
| 434 |
-
|
| 435 |
-
|
| 436 |
|
| 437 |
if next_action=='md':
|
| 438 |
st.markdown(file_contents)
|
| 439 |
buttonlabel = '🔍Run'
|
| 440 |
if st.button(key='Runmd', label = buttonlabel):
|
| 441 |
user_prompt = file_contents
|
| 442 |
-
|
| 443 |
-
|
| 444 |
-
|
| 445 |
-
|
| 446 |
|
| 447 |
if next_action=='search':
|
| 448 |
file_content_area = st.text_area("File Contents:", file_contents, height=500)
|
| 449 |
user_prompt = file_contents
|
| 450 |
-
|
| 451 |
-
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
|
| 455 |
-
|
| 456 |
-
|
| 457 |
-
|
| 458 |
-
|
| 459 |
# ----------------------------------------------------- File Sidebar for Jump Gates ------------------------------------------
|
| 460 |
FileSidebar()
|
| 461 |
|
|
|
|
| 424 |
if len(file_contents) > 0:
|
| 425 |
if next_action=='open':
|
| 426 |
file_content_area = st.text_area("File Contents:", file_contents, height=500)
|
| 427 |
+
#try:
|
| 428 |
+
if st.button("🔍", key="filecontentssearch"):
|
| 429 |
+
#search_glossary(file_content_area)
|
| 430 |
+
filesearch = PromptPrefix + file_content_area
|
| 431 |
+
st.markdown(filesearch)
|
| 432 |
+
if st.button(key=rerun, label='🔍Re-Spec' ):
|
| 433 |
+
search_glossary(filesearch)
|
| 434 |
+
#except:
|
| 435 |
+
st.markdown('GPT is sleeping. Restart ETA 30 seconds.')
|
| 436 |
|
| 437 |
if next_action=='md':
|
| 438 |
st.markdown(file_contents)
|
| 439 |
buttonlabel = '🔍Run'
|
| 440 |
if st.button(key='Runmd', label = buttonlabel):
|
| 441 |
user_prompt = file_contents
|
| 442 |
+
#try:
|
| 443 |
+
search_glossary(file_contents)
|
| 444 |
+
#except:
|
| 445 |
+
st.markdown('GPT is sleeping. Restart ETA 30 seconds.')
|
| 446 |
|
| 447 |
if next_action=='search':
|
| 448 |
file_content_area = st.text_area("File Contents:", file_contents, height=500)
|
| 449 |
user_prompt = file_contents
|
| 450 |
+
#try:
|
| 451 |
+
#search_glossary(file_contents)
|
| 452 |
+
filesearch = PromptPrefix2 + file_content_area
|
| 453 |
+
st.markdown(filesearch)
|
| 454 |
+
if st.button(key=rerun, label='🔍Re-Code' ):
|
| 455 |
+
search_glossary(filesearch)
|
| 456 |
+
|
| 457 |
+
#except:
|
| 458 |
+
st.markdown('GPT is sleeping. Restart ETA 30 seconds.')
|
| 459 |
# ----------------------------------------------------- File Sidebar for Jump Gates ------------------------------------------
|
| 460 |
FileSidebar()
|
| 461 |
|