dkdaniz commited on
Commit
1795b8c
1 Parent(s): efd2848

Update frontend.py

Browse files
Files changed (1) hide show
  1. frontend.py +8 -2
frontend.py CHANGED
@@ -13,6 +13,7 @@ app = Flask(__name__)
13
  app.secret_key = "LeafmanZSecretKey"
14
 
15
  API_HOST = "https://dkdaniz-katara.hf.space:5110/api"
 
16
 
17
  # PAGES #
18
  @app.route("/", methods=["GET", "POST"])
@@ -54,9 +55,11 @@ def home_page():
54
  show_response_modal=False,
55
  response_dict={"Prompt": "None", "Answer": "None", "Sources": [("ewf", "wef")]},
56
  )
 
57
 
58
 
59
- if __name__ == "__main__":
 
60
  parser = argparse.ArgumentParser()
61
  parser.add_argument("--port", type=int, default=5111, help="Port to run the UI on. Defaults to 5111.")
62
  parser.add_argument(
@@ -68,4 +71,7 @@ if __name__ == "__main__":
68
  "accessible from other devices.",
69
  )
70
  args = parser.parse_args()
71
- app.run(debug=False, host=args.host, port=args.port)
 
 
 
 
13
  app.secret_key = "LeafmanZSecretKey"
14
 
15
  API_HOST = "https://dkdaniz-katara.hf.space:5110/api"
16
+
17
 
18
  # PAGES #
19
  @app.route("/", methods=["GET", "POST"])
 
55
  show_response_modal=False,
56
  response_dict={"Prompt": "None", "Answer": "None", "Sources": [("ewf", "wef")]},
57
  )
58
+
59
 
60
 
61
+
62
+ def main():
63
  parser = argparse.ArgumentParser()
64
  parser.add_argument("--port", type=int, default=5111, help="Port to run the UI on. Defaults to 5111.")
65
  parser.add_argument(
 
71
  "accessible from other devices.",
72
  )
73
  args = parser.parse_args()
74
+ app.run(debug=False, host=args.host, port=args.port)
75
+
76
+ if __name__ == "__main__":
77
+ main()