Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -220,22 +220,22 @@ def link_button_with_emoji(url, title, emoji_summary):
|
|
| 220 |
st.markdown(f"[{random_emoji} {emoji_summary} - {title}]({url})")
|
| 221 |
|
| 222 |
python_parts = {
|
| 223 |
-
"
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
"emoji": "π»",
|
| 229 |
-
"details": "react, vue.js, angular, svelte, polymer, lit-element"
|
| 230 |
-
},
|
| 231 |
-
"3D Molecule Visualization Libraries": {
|
| 232 |
-
"emoji": "π¬",
|
| 233 |
-
"details": "rdkit, openbabel, py3Dmol, chemspipy, pymol"
|
| 234 |
},
|
|
|
|
|
|
|
| 235 |
"Python Mapping Libraries": {
|
| 236 |
"emoji": "π",
|
| 237 |
"details": "folium, geopandas, plotly, basemap, cartopy, leaflet, mapboxgl"
|
| 238 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
| 239 |
"Data Analysis Libraries": {
|
| 240 |
"emoji": "π",
|
| 241 |
"details": "pandas, numpy, scipy, matplotlib, seaborn, plotly, scikit-learn, statsmodels, pyarrow"
|
|
@@ -247,7 +247,15 @@ python_parts = {
|
|
| 247 |
"Filesystem Interaction Libraries": {
|
| 248 |
"emoji": "πΎ",
|
| 249 |
"details": "fs, pyfilesystem2, watchdog, scandir, pyftpdlib, fusepy"
|
|
|
|
|
|
|
|
|
|
| 250 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 251 |
"Scientific & Data Analysis Libraries": {"emoji": "π§ͺ", "details": "Numpy, Pandas, Scikit-Learn, TensorFlow, SciPy, Pillow"},
|
| 252 |
"Advanced Concepts": {"emoji": "π§ ", "details": "Decorators, Generators, Context Managers, Metaclasses, Asynchronous Programming"},
|
| 253 |
"Web & Network Libraries": {"emoji": "πΈοΈ", "details": "Flask, Django, Requests, BeautifulSoup, HTTPX, Asyncio"},
|
|
@@ -261,10 +269,6 @@ python_parts = {
|
|
| 261 |
"emoji": "π",
|
| 262 |
"details": "Requests, Pillow, SQLAlchemy, Flask, Django, SciPy, Beautiful Soup, PyTest, PyGame, Twisted"
|
| 263 |
},
|
| 264 |
-
"Data Science & Visualization": {
|
| 265 |
-
"emoji": "π",
|
| 266 |
-
"details": "numpy, pandas, matplotlib, requests, beautifulsoup4"
|
| 267 |
-
},
|
| 268 |
"PDF & Time Management": {
|
| 269 |
"emoji": "π",
|
| 270 |
"details": "langchain, openai, PyPDF2, pytz"
|
|
@@ -303,11 +307,7 @@ python_parts = {
|
|
| 303 |
"Functions": {"emoji": "π§", "details": "Defining, Calling, Parameters, Return Values"},
|
| 304 |
"Classes": {"emoji": "ποΈ", "details": "Creating, Inheritance, Methods, Properties"},
|
| 305 |
"API Interaction": {"emoji": "π", "details": "Requests, JSON Parsing, HTTP Methods"},
|
| 306 |
-
"Data Visualization Libraries1": {"emoji": "π", "details": "matplotlib, seaborn, plotly, altair, bokeh, pydeck"},
|
| 307 |
-
"Data Visualization Libraries2": {"emoji": "π", "details": "holoviews, plotnine, graphviz"},
|
| 308 |
"Error Handling": {"emoji": "β οΈ", "details": "Try, Except, Finally, Raising"},
|
| 309 |
-
"Azure Cloud Libraries": {"emoji": "βοΈ", "details": "azure-sdk, azure-cosmos, azure-storage-blob, azure-storage-file-share, azure-storage-queue, azure-mgmt-containerinstance, azure-mgmt-containerregistry, azure-mgmt-cosmosdb, azure-mgmt-resource, azure-functions"},
|
| 310 |
-
"Azure Development Tools": {"emoji": "π οΈ", "details": "azure-devtools, azure-cli-core, azure-cli, vscode-python"},
|
| 311 |
|
| 312 |
|
| 313 |
}
|
|
@@ -321,15 +321,15 @@ def display_python_parts():
|
|
| 321 |
for part, content in python_parts.items():
|
| 322 |
with st.expander(f"{content['emoji']} {part} - {content['details']}", expanded=False):
|
| 323 |
if st.button(f"Show Example for {part}", key=f"example_{part}"):
|
| 324 |
-
example = "
|
| 325 |
example_placeholders[part] = example
|
| 326 |
response = chat_with_model('Create detailed python script code example scripts with input data as python data structures and real URLs like wikipedia without functions for:' + example_placeholders[part], part)
|
| 327 |
st.code(response, language="python")
|
| 328 |
if st.button(f"Take Quiz on {part}", key=f"quiz_{part}"):
|
| 329 |
-
quiz = "
|
| 330 |
response = chat_with_model(quiz, part)
|
| 331 |
st.code(response, language="python")
|
| 332 |
-
prompt = f"Learn about
|
| 333 |
if st.button(f"Explore {part}", key=part):
|
| 334 |
response = chat_with_model(prompt, part)
|
| 335 |
response_placeholders[part] = response
|
|
|
|
| 220 |
st.markdown(f"[{random_emoji} {emoji_summary} - {title}]({url})")
|
| 221 |
|
| 222 |
python_parts = {
|
| 223 |
+
"Azure Cloud Libraries": {"emoji": "βοΈ", "details": "azure-sdk, azure-cosmos, azure-storage-blob, azure-storage-file-share, azure-storage-queue, azure-mgmt-containerinstance, azure-mgmt-containerregistry, azure-mgmt-cosmosdb, azure-mgmt-resource, azure-functions"},
|
| 224 |
+
"Azure Development Tools": {"emoji": "π οΈ", "details": "azure-devtools, azure-cli-core, azure-cli, vscode-python"},
|
| 225 |
+
"Data Science & Visualization": {
|
| 226 |
+
"emoji": "π",
|
| 227 |
+
"details": "numpy, pandas, matplotlib, requests, beautifulsoup4"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 228 |
},
|
| 229 |
+
"Data Visualization Libraries1": {"emoji": "π", "details": "matplotlib, seaborn, plotly, altair, bokeh, pydeck"},
|
| 230 |
+
"Data Visualization Libraries2": {"emoji": "π", "details": "holoviews, plotnine, graphviz"},
|
| 231 |
"Python Mapping Libraries": {
|
| 232 |
"emoji": "π",
|
| 233 |
"details": "folium, geopandas, plotly, basemap, cartopy, leaflet, mapboxgl"
|
| 234 |
},
|
| 235 |
+
"3D Molecule Visualization Libraries": {
|
| 236 |
+
"emoji": "π¬",
|
| 237 |
+
"details": "rdkit, openbabel, py3Dmol, chemspipy, pymol"
|
| 238 |
+
},
|
| 239 |
"Data Analysis Libraries": {
|
| 240 |
"emoji": "π",
|
| 241 |
"details": "pandas, numpy, scipy, matplotlib, seaborn, plotly, scikit-learn, statsmodels, pyarrow"
|
|
|
|
| 247 |
"Filesystem Interaction Libraries": {
|
| 248 |
"emoji": "πΎ",
|
| 249 |
"details": "fs, pyfilesystem2, watchdog, scandir, pyftpdlib, fusepy"
|
| 250 |
+
}, "HTML5 Graphics Libraries": {
|
| 251 |
+
"emoji": "π",
|
| 252 |
+
"details": "aframe, threejs, p5.js, pixi.js, paper.js, babylonjs, d3.js, vis.js"
|
| 253 |
},
|
| 254 |
+
"HTML5 UI Interaction Libraries": {
|
| 255 |
+
"emoji": "π»",
|
| 256 |
+
"details": "react, vue.js, angular, svelte, polymer, lit-element"
|
| 257 |
+
},
|
| 258 |
+
|
| 259 |
"Scientific & Data Analysis Libraries": {"emoji": "π§ͺ", "details": "Numpy, Pandas, Scikit-Learn, TensorFlow, SciPy, Pillow"},
|
| 260 |
"Advanced Concepts": {"emoji": "π§ ", "details": "Decorators, Generators, Context Managers, Metaclasses, Asynchronous Programming"},
|
| 261 |
"Web & Network Libraries": {"emoji": "πΈοΈ", "details": "Flask, Django, Requests, BeautifulSoup, HTTPX, Asyncio"},
|
|
|
|
| 269 |
"emoji": "π",
|
| 270 |
"details": "Requests, Pillow, SQLAlchemy, Flask, Django, SciPy, Beautiful Soup, PyTest, PyGame, Twisted"
|
| 271 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
| 272 |
"PDF & Time Management": {
|
| 273 |
"emoji": "π",
|
| 274 |
"details": "langchain, openai, PyPDF2, pytz"
|
|
|
|
| 307 |
"Functions": {"emoji": "π§", "details": "Defining, Calling, Parameters, Return Values"},
|
| 308 |
"Classes": {"emoji": "ποΈ", "details": "Creating, Inheritance, Methods, Properties"},
|
| 309 |
"API Interaction": {"emoji": "π", "details": "Requests, JSON Parsing, HTTP Methods"},
|
|
|
|
|
|
|
| 310 |
"Error Handling": {"emoji": "β οΈ", "details": "Try, Except, Finally, Raising"},
|
|
|
|
|
|
|
| 311 |
|
| 312 |
|
| 313 |
}
|
|
|
|
| 321 |
for part, content in python_parts.items():
|
| 322 |
with st.expander(f"{content['emoji']} {part} - {content['details']}", expanded=False):
|
| 323 |
if st.button(f"Show Example for {part}", key=f"example_{part}"):
|
| 324 |
+
example = "Write three streamlit python examples without functions with mock example inputs as python data structures and real URLs like wikipedia for " + part
|
| 325 |
example_placeholders[part] = example
|
| 326 |
response = chat_with_model('Create detailed python script code example scripts with input data as python data structures and real URLs like wikipedia without functions for:' + example_placeholders[part], part)
|
| 327 |
st.code(response, language="python")
|
| 328 |
if st.button(f"Take Quiz on {part}", key=f"quiz_{part}"):
|
| 329 |
+
quiz = "Write three streamlit python program quiz examples without functions with mock example inputs as python data structures and real URLs like wikipedia for " + part
|
| 330 |
response = chat_with_model(quiz, part)
|
| 331 |
st.code(response, language="python")
|
| 332 |
+
prompt = f"Learn about Writing three streamlit python examples that feature a programmatic UI using mock example inputs for {content['details']}"
|
| 333 |
if st.button(f"Explore {part}", key=part):
|
| 334 |
response = chat_with_model(prompt, part)
|
| 335 |
response_placeholders[part] = response
|