Spaces:
Sleeping
Sleeping
File size: 2,139 Bytes
15b7ca5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | 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) |