Spaces:
Running
Running
Upload index.html with huggingface_hub
Browse files- index.html +89 -19
index.html
CHANGED
|
@@ -1,19 +1,89 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Python Code Studio | Browser-Based Python Development</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script src="https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.0.2"></script>
|
| 9 |
+
</head>
|
| 10 |
+
<body>
|
| 11 |
+
<div class="container">
|
| 12 |
+
<header>
|
| 13 |
+
<h1>🐍 Python Code Studio</h1>
|
| 14 |
+
<p class="subtitle">Develop, test, and run Python scripts directly in your browser</p>
|
| 15 |
+
<p class="attribution">Built with <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">anycoder</a></p>
|
| 16 |
+
</header>
|
| 17 |
+
|
| 18 |
+
<div class="app-container">
|
| 19 |
+
<div class="controls">
|
| 20 |
+
<div class="control-group">
|
| 21 |
+
<button id="generateBtn" class="btn primary">Generate Code</button>
|
| 22 |
+
<button id="runBtn" class="btn success">Run Script</button>
|
| 23 |
+
<button id="debugBtn" class="btn warning">Debug & Fix</button>
|
| 24 |
+
<button id="clearBtn" class="btn danger">Clear</button>
|
| 25 |
+
</div>
|
| 26 |
+
<div class="control-group">
|
| 27 |
+
<label for="modelSelect">Model:</label>
|
| 28 |
+
<select id="modelSelect">
|
| 29 |
+
<option value="microsoft/DialogRPT-updown">Code Generation Model</option>
|
| 30 |
+
</select>
|
| 31 |
+
</div>
|
| 32 |
+
</div>
|
| 33 |
+
|
| 34 |
+
<div class="editor-section">
|
| 35 |
+
<div class="input-section">
|
| 36 |
+
<h3>Code Description</h3>
|
| 37 |
+
<textarea id="promptInput" placeholder="Describe the Python code you want to generate (e.g., 'Create a function to calculate fibonacci sequence', 'Build a web scraper for news headlines')" rows="4"></textarea>
|
| 38 |
+
|
| 39 |
+
<div class="examples">
|
| 40 |
+
<h4>Quick Examples:</h4>
|
| 41 |
+
<div class="example-buttons">
|
| 42 |
+
<button class="example-btn" data-prompt="Create a function to calculate factorial of a number">Factorial Calculator</button>
|
| 43 |
+
<button class="example-btn" data-prompt="Write a Python script to sort a list of dictionaries by a specific key">List Sorter</button>
|
| 44 |
+
<button class="example-btn" data-prompt="Create a simple web scraper using requests and BeautifulSoup">Web Scraper</button>
|
| 45 |
+
<button class="example-btn" data-prompt="Write a function to check if a string is a palindrome">Palindrome Checker</button>
|
| 46 |
+
</div>
|
| 47 |
+
</div>
|
| 48 |
+
</div>
|
| 49 |
+
|
| 50 |
+
<div class="code-section">
|
| 51 |
+
<h3>Python Code Editor</h3>
|
| 52 |
+
<textarea id="codeEditor" placeholder="Your Python code will appear here..."></textarea>
|
| 53 |
+
</div>
|
| 54 |
+
</div>
|
| 55 |
+
|
| 56 |
+
<div class="output-section">
|
| 57 |
+
<h3>Execution Results</h3>
|
| 58 |
+
<div id="outputContainer">
|
| 59 |
+
<div id="outputText">Ready to run Python code...</div>
|
| 60 |
+
</div>
|
| 61 |
+
</div>
|
| 62 |
+
|
| 63 |
+
<div class="status-section">
|
| 64 |
+
<div id="statusIndicator" class="status idle">
|
| 65 |
+
<span class="status-dot"></span>
|
| 66 |
+
<span class="status-text">Ready</span>
|
| 67 |
+
</div>
|
| 68 |
+
<div id="progressContainer" class="progress-container">
|
| 69 |
+
<div id="progressBar" class="progress-bar"></div>
|
| 70 |
+
<span id="progressText">0%</span>
|
| 71 |
+
</div>
|
| 72 |
+
</div>
|
| 73 |
+
</div>
|
| 74 |
+
|
| 75 |
+
<div class="features">
|
| 76 |
+
<h3>Features</h3>
|
| 77 |
+
<ul>
|
| 78 |
+
<li>✅ Generate Python code from natural language descriptions</li>
|
| 79 |
+
<li>✅ Execute Python scripts in browser using Pyodide</li>
|
| 80 |
+
<li>✅ Debug and fix code errors automatically</li>
|
| 81 |
+
<li>✅ No server required - everything runs locally</li>
|
| 82 |
+
<li>✅ Support for common Python libraries</li>
|
| 83 |
+
</ul>
|
| 84 |
+
</div>
|
| 85 |
+
</div>
|
| 86 |
+
|
| 87 |
+
<script src="index.js"></script>
|
| 88 |
+
</body>
|
| 89 |
+
</html>
|