marcosremar2's picture
Add Dockerfile, Flask app, and requirements
15b7ca5
from flask import Flask, render_template_string
app = Flask(__name__)
HTML_TEMPLATE = """
<!DOCTYPE html>
<html>
<head>
<title>MinerU PDF Processor</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;
}
.success {
background-color: #d4edda;
color: #155724;
padding: 15px;
border-radius: 5px;
margin: 15px 0;
}
</style>
</head>
<body>
<h1>πŸ“„ MinerU PDF Processor</h1>
<div class="container">
<h2>Welcome to MinerU PDF Processor</h2>
<div class="success">
<h3>βœ… Deployment Successful!</h3>
<p>Your MinerU PDF Processor has been successfully deployed to Hugging Face Spaces.</p>
</div>
<div class="info">
<h3>About MinerU</h3>
<p>MinerU is a powerful PDF processing toolkit that converts PDF documents to structured formats like Markdown and JSON.</p>
<p>It excels at preserving document layout, recognizing mathematical formulas, and reconstructing tables.</p>
</div>
<p>This is the initial deployment. The full MinerU application with PDF processing capabilities will be available soon.</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)