mineru / app.py
marcosremar2's picture
Upload folder using huggingface_hub
4377e1a verified
Raw
History Blame Contribute Delete
2.08 kB
from flask import Flask, render_template_string
app = Flask(__name__)
HTML_TEMPLATE = """
<!DOCTYPE html>
<html>
<head>
<title>Hello from Mineru</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: #333;
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #f5f8fa;
}
h1 {
color: #2c3e50;
border-bottom: 2px solid #3498db;
padding-bottom: 10px;
}
.container {
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
margin-top: 20px;
}
.info {
background-color: #e8f4fc;
padding: 15px;
border-radius: 5px;
margin: 15px 0;
}
a {
color: #3498db;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<h1>๐Ÿ‘‹ Hello from Mineru!</h1>
<div class="container">
<h2>Welcome to the Mineru Docker Demo</h2>
<p>This is a simple demonstration of a Docker container running on Hugging Face Spaces.</p>
<div class="info">
<h3>About Mineru</h3>
<p>Mineru is a PDF processing toolkit that converts PDF documents to structured formats like Markdown and JSON.</p>
<p>The full version of this application can process PDF files and extract their content with high fidelity.</p>
</div>
<p>To learn more about deploying Docker containers on Hugging Face Spaces, check out the
<a href="https://huggingface.co/docs/hub/spaces-sdks-docker" target="_blank">official documentation</a>.</p>
</div>
</body>
</html>
"""
@app.route('/')
def index():
return render_template_string(HTML_TEMPLATE)
if __name__ == '__main__':
app.run(host='0.0.0.0', port=7860)