docs-llms-txt / app.py
mishig's picture
mishig HF staff
Update app.py
2c91845 verified
raw
history blame
887 Bytes
import os
import requests
import json
from io import BytesIO
from flask import Flask, jsonify, render_template, request, send_file
app = Flask(__name__)
@app.route("/")
def index():
# Basic HTML string
html = '''
<!DOCTYPE html>
<html>
<head>
<title>Dynamic HTML Page</title>
<style>
body { font-family: Arial, sans-serif; margin: 40px; }
.container { max-width: 800px; margin: 0 auto; }
.highlight { background-color: #f0f0f0; padding: 20px; }
</style>
</head>
<body>
<div class="container">
<h1>Welcome to Flask</h1>
<div class="highlight">
<p>This HTML was rendered directly from a string!</p>
</div>
</div>
</body>
</html>
'''
return html
if __name__ == "__main__":
app.run(host="0.0.0.0", port=7860)