vansin commited on
Commit
2ffecc8
β€’
1 Parent(s): fc86384

feat: update

Browse files
app.py CHANGED
@@ -1,37 +1,36 @@
1
- import os
2
 
3
- import subprocess
4
- import sys
5
 
6
 
7
 
8
 
9
- # # os.system("python -m mindsearch.app --lang en --model_format internlm_server")
10
- os.system("python -m mindsearch.app --lang en --model_format internlm_server &")
11
 
12
- os.system("bash install.sh")
13
 
14
 
15
 
16
 
17
- # from flask import Flask, send_from_directory
18
 
19
 
20
- # app = Flask(__name__, static_folder='dist')
21
 
22
- # @app.route('/')
23
- # def serve_index():
24
- # return send_from_directory(app.static_folder, 'index.html')
25
 
26
- # @app.route('/<path:path>')
27
- # def serve_file(path):
28
- # return send_from_directory(app.static_folder, path)
29
 
30
- # if __name__ == '__main__':
31
 
32
- # subprocess.Popen(["python", "-m", "mindsearch.app", "--lang", "en", "--model_format", "internlm_server"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
33
 
34
- # app.run(debug=False, port=7860, host="0.0.0.0")
35
 
36
 
37
  # import json
 
1
+ # import os
2
 
3
+ # import subprocess
4
+ # import sys
5
 
6
 
7
 
8
 
9
+ # # # os.system("python -m mindsearch.app --lang en --model_format internlm_server")
10
+ # os.system("python -m mindsearch.app --lang en --model_format internlm_server &")
11
 
12
+ # os.system("bash install.sh")
13
 
14
 
15
 
16
 
17
+ from flask import Flask, send_from_directory
18
 
19
 
20
+ app = Flask(__name__, static_folder='dist')
21
 
22
+ @app.route('/')
23
+ def serve_index():
24
+ return send_from_directory(app.static_folder, 'index.html')
25
 
26
+ @app.route('/<path:path>')
27
+ def serve_file(path):
28
+ return send_from_directory(app.static_folder, path)
29
 
30
+ if __name__ == '__main__':
31
 
 
32
 
33
+ app.run(debug=False, port=7860, host="0.0.0.0")
34
 
35
 
36
  # import json
dist/assets/{index-26b4a389.js β†’ index-33b9caaa.js} RENAMED
The diff for this file is too large to render. See raw diff
 
dist/assets/{index-legacy-f957e103.js β†’ index-legacy-15e8503d.js} RENAMED
The diff for this file is too large to render. See raw diff
 
dist/index.html CHANGED
@@ -5,7 +5,7 @@
5
  <link rel="icon" type="image/svg+xml" href="" />
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
  <title></title>
8
- <script type="module" crossorigin src="/assets/index-26b4a389.js"></script>
9
  <link rel="stylesheet" href="/assets/index-ab4095ce.css">
10
  <script type="module">import.meta.url;import("_").catch(()=>1);async function* g(){};if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script>
11
  <script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
@@ -16,6 +16,6 @@
16
 
17
  <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
18
  <script nomodule crossorigin id="vite-legacy-polyfill" src="/assets/polyfills-legacy-0b55db5f.js"></script>
19
- <script nomodule crossorigin id="vite-legacy-entry" data-src="/assets/index-legacy-f957e103.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
20
  </body>
21
  </html>
 
5
  <link rel="icon" type="image/svg+xml" href="" />
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
  <title></title>
8
+ <script type="module" crossorigin src="/assets/index-33b9caaa.js"></script>
9
  <link rel="stylesheet" href="/assets/index-ab4095ce.css">
10
  <script type="module">import.meta.url;import("_").catch(()=>1);async function* g(){};if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script>
11
  <script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
 
16
 
17
  <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
18
  <script nomodule crossorigin id="vite-legacy-polyfill" src="/assets/polyfills-legacy-0b55db5f.js"></script>
19
+ <script nomodule crossorigin id="vite-legacy-entry" data-src="/assets/index-legacy-15e8503d.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
20
  </body>
21
  </html>
frontend/React/src/config/cgi.ts CHANGED
@@ -1,2 +1,2 @@
1
  export const mode = import.meta.env.MODE;
2
- export const GET_SSE_DATA = 'http://127.0.0.1:8002/solve';
 
1
  export const mode = import.meta.env.MODE;
2
+ export const GET_SSE_DATA = '/solve';
mindsearch/agent/__init__.py CHANGED
@@ -3,6 +3,10 @@ from datetime import datetime
3
 
4
  from lagent.actions import ActionExecutor, BingBrowser
5
 
 
 
 
 
6
  import mindsearch.agent.models as llm_factory
7
  from mindsearch.agent.mindsearch_agent import (MindSearchAgent,
8
  MindSearchProtocol)
 
3
 
4
  from lagent.actions import ActionExecutor, BingBrowser
5
 
6
+ import os
7
+
8
+ #BING_API_KEY = os.getenv['BING_API_KEY']
9
+
10
  import mindsearch.agent.models as llm_factory
11
  from mindsearch.agent.mindsearch_agent import (MindSearchAgent,
12
  MindSearchProtocol)