# import os # import subprocess # import sys import os # # # os.system("python -m mindsearch.app --lang en --model_format internlm_server") # os.system("python -m mindsearch.app --lang en --model_format internlm_server &") # os.system("bash install.sh") from flask import Flask, send_from_directory, request, jsonify import requests app = Flask(__name__, static_folder='dist') @app.route('/') def serve_index(): return send_from_directory(app.static_folder, 'index.html') @app.route('/hw') def helloworld(): return "Hello World" @app.route('/') def serve_file(path): return send_from_directory(app.static_folder, path) if __name__ == '__main__': app.run(debug=False, port=7860, host="0.0.0.0")