AkashKumarave commited on
Commit
9c35b0c
·
verified ·
1 Parent(s): 883f8b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -3
app.py CHANGED
@@ -1,4 +1,3 @@
1
-
2
  import os
3
  import json
4
  import requests
@@ -21,7 +20,18 @@ cssutils.log.setLevel(logging.CRITICAL) # Suppress CSS parsing warnings
21
 
22
  @app.route('/')
23
  def home():
24
- # ... keep existing code (HTML for homepage)
 
 
 
 
 
 
 
 
 
 
 
25
 
26
  @app.route('/api/convert', methods=['POST'])
27
  def convert_website():
@@ -657,4 +667,4 @@ def apply_common_styles(element_data, style):
657
 
658
  if __name__ == "__main__":
659
  port = int(os.environ.get("PORT", 7860))
660
- app.run(host="0.0.0.0", port=port)
 
 
1
  import os
2
  import json
3
  import requests
 
20
 
21
  @app.route('/')
22
  def home():
23
+ return """
24
+ <!DOCTYPE html>
25
+ <html>
26
+ <head>
27
+ <title>Website Converter</title>
28
+ </head>
29
+ <body>
30
+ <h1>Welcome to Website Converter</h1>
31
+ <p>Use the /api/convert endpoint to convert websites to structured data.</p>
32
+ </body>
33
+ </html>
34
+ """
35
 
36
  @app.route('/api/convert', methods=['POST'])
37
  def convert_website():
 
667
 
668
  if __name__ == "__main__":
669
  port = int(os.environ.get("PORT", 7860))
670
+ app.run(host="0.0.0.0", port=port)