dkdaniz commited on
Commit
236d7ee
1 Parent(s): 9386238

Update localGPTUI/localGPTUI.py

Browse files
Files changed (1) hide show
  1. localGPTUI/localGPTUI.py +14 -0
localGPTUI/localGPTUI.py CHANGED
@@ -56,6 +56,20 @@ def home_page():
56
  response_dict={"Prompt": "None", "Answer": "None", "Sources": [("ewf", "wef")]},
57
  )
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
  if __name__ == "__main__":
61
  parser = argparse.ArgumentParser()
 
56
  response_dict={"Prompt": "None", "Answer": "None", "Sources": [("ewf", "wef")]},
57
  )
58
 
59
+ def run():
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(
63
+ "--host",
64
+ type=str,
65
+ default="0.0.0.0",
66
+ help="Host to run the UI on. Defaults to 127.0.0.1. "
67
+ "Set to 0.0.0.0 to make the UI externally "
68
+ "accessible from other devices.",
69
+ )
70
+ args = parser.parse_args()
71
+ app.run(debug=False, host=args.host, port=args.port)
72
+
73
 
74
  if __name__ == "__main__":
75
  parser = argparse.ArgumentParser()