Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -450,31 +450,20 @@ def search_glossary(query):
|
|
450 |
|
451 |
all=""
|
452 |
|
453 |
-
query2 = PromptPrefix + query
|
454 |
-
|
455 |
-
|
456 |
-
response = chat_with_model(query2)
|
457 |
-
#filename = generate_filename(query2 + ' --- ' + response, "md")
|
458 |
-
#create_file(filename, query, response, should_save)
|
459 |
-
|
460 |
query3 = PromptPrefix2 + query + ' for story outline of method steps: ' + response # Add prompt preface for coding task behavior
|
461 |
-
# st.write('## ' + query3)
|
462 |
-
st.write('## 🔍 Coding with GPT.') # -------------------------------------------------------------------------------------------------
|
463 |
response2 = chat_with_model(query3)
|
464 |
-
#filename_txt = generate_filename(query + ' --- ' + response2, "py")
|
465 |
-
#create_file(filename_txt, query, response2, should_save)
|
466 |
|
467 |
-
query4 = PromptPrefix3 + query + ' using this streamlit python
|
468 |
-
|
469 |
-
st.write('## 🔍 Coding with GPT.') # -------------------------------------------------------------------------------------------------
|
470 |
-
response3 = chat_with_model(query3)
|
471 |
-
#filename_txt = generate_filename(query + ' --- ' + response2, "py")
|
472 |
-
#create_file(filename_txt, query, response2, should_save)
|
473 |
|
474 |
-
all =
|
475 |
|
476 |
-
filename = generate_filename(
|
477 |
create_file(filename, query, all, should_save)
|
|
|
478 |
SpeechSynthesis(all)
|
479 |
return all
|
480 |
|
|
|
450 |
|
451 |
all=""
|
452 |
|
453 |
+
query2 = PromptPrefix + query
|
454 |
+
response = chat_with_model(query2)
|
455 |
+
|
|
|
|
|
|
|
|
|
456 |
query3 = PromptPrefix2 + query + ' for story outline of method steps: ' + response # Add prompt preface for coding task behavior
|
|
|
|
|
457 |
response2 = chat_with_model(query3)
|
|
|
|
|
458 |
|
459 |
+
query4 = PromptPrefix3 + query + ' using this streamlit python programspecification to define features. Create entities for each variable and generate UI with HTML5 and JS that matches the streamlit program: ' + response2 # Add prompt preface for coding task behavior
|
460 |
+
response3 = chat_with_model(query4)
|
|
|
|
|
|
|
|
|
461 |
|
462 |
+
all = query + ' ' + response + ' ' + response2 + ' ' + response3
|
463 |
|
464 |
+
filename = generate_filename(all, "md")
|
465 |
create_file(filename, query, all, should_save)
|
466 |
+
|
467 |
SpeechSynthesis(all)
|
468 |
return all
|
469 |
|