Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,6 +17,7 @@ st.set_page_config(
|
|
17 |
}
|
18 |
)
|
19 |
PromptPrefix = 'Create a markdown outline and table with appropriate emojis for card game rulesets which define the method steps of play for the topics of '
|
|
|
20 |
|
21 |
st.markdown('''### 🎴📚🧠CardGameAI
|
22 |
- **Elevate Your Game with Mixable Card Game AI:** Dive into a universe where strategy meets creativity.
|
@@ -148,29 +149,25 @@ def search_glossary(query):
|
|
148 |
st.markdown(f"#### {category}")
|
149 |
st.write(f"- {query}")
|
150 |
|
151 |
-
query = PromptPrefix + query # Add prompt preface for method step task behavior
|
152 |
-
st.write('## ' + query)
|
153 |
-
|
154 |
all=""
|
|
|
|
|
|
|
155 |
st.write('## 🔍 Running with GPT.') # -------------------------------------------------------------------------------------------------
|
156 |
-
response = chat_with_model(
|
157 |
-
|
158 |
-
|
159 |
-
filename = generate_filename(query + ' --- ' + response, "md")
|
160 |
create_file(filename, query, response, should_save)
|
161 |
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
filename_txt = generate_filename(query + ' --- ' + response2, "
|
167 |
create_file(filename_txt, query, response2, should_save)
|
168 |
-
|
169 |
all = '# Query: ' + query + '# Response: ' + response + '# Response2: ' + response2
|
170 |
-
|
171 |
filename_txt2 = generate_filename(query + ' --- ' + all, "md")
|
172 |
create_file(filename_txt2, query, all, should_save)
|
173 |
-
|
174 |
SpeechSynthesis(all)
|
175 |
return all
|
176 |
|
|
|
17 |
}
|
18 |
)
|
19 |
PromptPrefix = 'Create a markdown outline and table with appropriate emojis for card game rulesets which define the method steps of play for the topics of '
|
20 |
+
PromptPrefix2 = 'Create a streamlit python user interface and app with appropriate emojis for card game rules with method steps of play and show full code listing for the subject: '
|
21 |
|
22 |
st.markdown('''### 🎴📚🧠CardGameAI
|
23 |
- **Elevate Your Game with Mixable Card Game AI:** Dive into a universe where strategy meets creativity.
|
|
|
149 |
st.markdown(f"#### {category}")
|
150 |
st.write(f"- {query}")
|
151 |
|
|
|
|
|
|
|
152 |
all=""
|
153 |
+
|
154 |
+
query2 = PromptPrefix + query # Add prompt preface for method step task behavior
|
155 |
+
# st.write('## ' + query2)
|
156 |
st.write('## 🔍 Running with GPT.') # -------------------------------------------------------------------------------------------------
|
157 |
+
response = chat_with_model(query2)
|
158 |
+
filename = generate_filename(query2 + ' --- ' + response, "md")
|
|
|
|
|
159 |
create_file(filename, query, response, should_save)
|
160 |
|
161 |
+
query3 = PromptPrefix2 + query # Add prompt preface for coding task behavior
|
162 |
+
# st.write('## ' + query3)
|
163 |
+
st.write('## 🔍 Coding with GPT.') # -------------------------------------------------------------------------------------------------
|
164 |
+
response2 = chat_with_model(query3)
|
165 |
+
filename_txt = generate_filename(query + ' --- ' + response2, "py")
|
166 |
create_file(filename_txt, query, response2, should_save)
|
167 |
+
|
168 |
all = '# Query: ' + query + '# Response: ' + response + '# Response2: ' + response2
|
|
|
169 |
filename_txt2 = generate_filename(query + ' --- ' + all, "md")
|
170 |
create_file(filename_txt2, query, all, should_save)
|
|
|
171 |
SpeechSynthesis(all)
|
172 |
return all
|
173 |
|