Spaces:
Sleeping
Sleeping
Rajan Sharma
commited on
Add placeholder main.py
Browse files
main.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import http.server
|
| 2 |
+
import socketserver
|
| 3 |
+
|
| 4 |
+
PORT = 7860
|
| 5 |
+
|
| 6 |
+
html = b"""
|
| 7 |
+
<!DOCTYPE html>
|
| 8 |
+
<html>
|
| 9 |
+
<head>
|
| 10 |
+
<title>Monte Carlo Portfolio Simulation</title>
|
| 11 |
+
</head>
|
| 12 |
+
<body>
|
| 13 |
+
<h1>Monte Carlo Portfolio Simulation</h1>
|
| 14 |
+
<p>This is a placeholder for the Monte Carlo portfolio simulation app. The full functionality will be added later.</p>
|
| 15 |
+
</body>
|
| 16 |
+
</html>
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
class Handler(http.server.SimpleHTTPRequestHandler):
|
| 20 |
+
def do_GET(self):
|
| 21 |
+
self.send_response(200)
|
| 22 |
+
self.send_header("Content-type", "text/html")
|
| 23 |
+
self.end_headers()
|
| 24 |
+
self.wfile.write(html)
|
| 25 |
+
|
| 26 |
+
with socketserver.TCPServer(("", PORT), Handler) as httpd:
|
| 27 |
+
print(f"Serving placeholder app on port {PORT}")
|
| 28 |
+
httpd.serve_forever()
|