Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,12 +1,74 @@
|
|
| 1 |
---
|
| 2 |
-
title: Code
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
colorTo: blue
|
| 6 |
sdk: streamlit
|
| 7 |
sdk_version: 1.46.1
|
| 8 |
app_file: app.py
|
| 9 |
-
pinned:
|
| 10 |
---
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Pro Code Playground
|
| 3 |
+
emoji: π»
|
| 4 |
+
colorFrom: indigo
|
| 5 |
colorTo: blue
|
| 6 |
sdk: streamlit
|
| 7 |
sdk_version: 1.46.1
|
| 8 |
app_file: app.py
|
| 9 |
+
pinned: true
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# π» Pro Code Playground
|
| 13 |
+
|
| 14 |
+
**Pro Code Playground** is an interactive Python code editor and runner, with built-in AI code assistant, powered by [Streamlit](https://streamlit.io/).
|
| 15 |
+
It features a live code editor, stdin simulation, and theme support for light and dark modes.
|
| 16 |
+
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
### π Features
|
| 20 |
+
|
| 21 |
+
- π§ AI Assistant (LLaMA-3 via Groq)
|
| 22 |
+
- π Live Python code editor (via `streamlit_ace`)
|
| 23 |
+
- π§ͺ Simulate input with `stdin`
|
| 24 |
+
- π Theme toggle (light/dark)
|
| 25 |
+
- π¬ Scrollable, memory-aware chatbot
|
| 26 |
+
- π¨ Custom dynamic styling with CSS injection
|
| 27 |
+
- π (Optional) Text-to-speech via Edge TTS
|
| 28 |
+
|
| 29 |
+
---
|
| 30 |
+
|
| 31 |
+
### π οΈ Tech Stack
|
| 32 |
+
|
| 33 |
+
- `Streamlit` + `streamlit_ace`
|
| 34 |
+
- `LangChain`, `Groq`, `LLaMA 3`
|
| 35 |
+
- `Edge TTS` (optional)
|
| 36 |
+
- Fully modular structure (`app.py`, `layout.py`, `style.py`, `chatbot.py`)
|
| 37 |
+
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
### π§ Configuration
|
| 41 |
+
|
| 42 |
+
- Toggle light/dark mode with emoji switch βοΈ / π
|
| 43 |
+
- Customize themes easily via `layout.py`
|
| 44 |
+
- Built to run inside Hugging Face Spaces or locally
|
| 45 |
+
|
| 46 |
+
---
|
| 47 |
+
|
| 48 |
+
### π§ Powered by
|
| 49 |
+
|
| 50 |
+
- **LLM**: LLaMA 3β70B (via [Groq API](https://console.groq.com/))
|
| 51 |
+
- **LangChain**: Prompt templates & memory
|
| 52 |
+
- **Hugging Face Spaces**: Host and deploy
|
| 53 |
+
|
| 54 |
+
---
|
| 55 |
+
|
| 56 |
+
### π Project Structure
|
| 57 |
+
|
| 58 |
+
.
|
| 59 |
+
βββ app.py # Main Streamlit app
|
| 60 |
+
βββ layout.py # Session init & dynamic theming
|
| 61 |
+
βββ style.py # (optional) legacy theming logic
|
| 62 |
+
βββ chatbot.py # AI assistant with memory & summary
|
| 63 |
+
βββ utils.py # Code execution logic
|
| 64 |
+
βββ requirements.txt
|
| 65 |
+
βββ README.md
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
---
|
| 69 |
+
|
| 70 |
+
### π§ͺ Try It Live
|
| 71 |
+
|
| 72 |
+
This app is live on [π€ Hugging Face Spaces](https://huggingface.co/spaces/vsj0702/Code_editor) β just run it in your browser, no setup needed.
|
| 73 |
+
|
| 74 |
+
---
|