Spaces:
Running
Running
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Python Parser</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
</head> | |
<body class="bg-gray-100 min-h-screen flex items-center justify-center"> | |
<div class="bg-white p-8 rounded-lg shadow-lg max-w-2xl w-full"> | |
<h1 class="text-3xl font-bold text-gray-800 mb-6 text-center">Python Code Parser</h1> | |
<!-- File Upload --> | |
<form method="post" enctype="multipart/form-data" class="space-y-6"> | |
<div> | |
<label class="block text-sm font-medium text-gray-700 mb-2">Upload a Python File</label> | |
<input type="file" name="file" accept=".py" class="w-full p-2 border rounded-lg focus:ring-2 focus:ring-blue-500"> | |
</div> | |
<!-- Paste Code --> | |
<div> | |
<label class="block text-sm font-medium text-gray-700 mb-2">Or Paste Your Code</label> | |
<textarea name="code" rows="6" class="w-full p-2 border rounded-lg focus:ring-2 focus:ring-blue-500" placeholder="Paste Python code here..."></textarea> | |
<input type="text" name="filename" class="mt-2 w-full p-2 border rounded-lg" placeholder="Enter filename (e.g., script.py)"> | |
</div> | |
<button type="submit" class="w-full bg-blue-600 text-white p-2 rounded-lg hover:bg-blue-700 transition">Parse</button> | |
</form> | |
</div> | |
</body> | |
</html> |