guoj5 commited on
Commit
d1f88fb
·
1 Parent(s): b9c9b71

Change a little

Browse files
backend/__pycache__/solver.cpython-313.pyc CHANGED
Binary files a/backend/__pycache__/solver.cpython-313.pyc and b/backend/__pycache__/solver.cpython-313.pyc differ
 
backend/static/asset-manifest.json CHANGED
@@ -1,15 +1,15 @@
1
  {
2
  "files": {
3
  "main.css": "/static/css/main.e6c13ad2.css",
4
- "main.js": "/static/js/main.120fc3ad.js",
5
  "static/js/453.8ab44547.chunk.js": "/static/js/453.8ab44547.chunk.js",
6
  "index.html": "/index.html",
7
  "main.e6c13ad2.css.map": "/static/css/main.e6c13ad2.css.map",
8
- "main.120fc3ad.js.map": "/static/js/main.120fc3ad.js.map",
9
  "453.8ab44547.chunk.js.map": "/static/js/453.8ab44547.chunk.js.map"
10
  },
11
  "entrypoints": [
12
  "static/css/main.e6c13ad2.css",
13
- "static/js/main.120fc3ad.js"
14
  ]
15
  }
 
1
  {
2
  "files": {
3
  "main.css": "/static/css/main.e6c13ad2.css",
4
+ "main.js": "/static/js/main.cc4bfe13.js",
5
  "static/js/453.8ab44547.chunk.js": "/static/js/453.8ab44547.chunk.js",
6
  "index.html": "/index.html",
7
  "main.e6c13ad2.css.map": "/static/css/main.e6c13ad2.css.map",
8
+ "main.cc4bfe13.js.map": "/static/js/main.cc4bfe13.js.map",
9
  "453.8ab44547.chunk.js.map": "/static/js/453.8ab44547.chunk.js.map"
10
  },
11
  "entrypoints": [
12
  "static/css/main.e6c13ad2.css",
13
+ "static/js/main.cc4bfe13.js"
14
  ]
15
  }
backend/static/index.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title><script defer="defer" src="/static/js/main.120fc3ad.js"></script><link href="/static/css/main.e6c13ad2.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
 
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title><script defer="defer" src="/static/js/main.cc4bfe13.js"></script><link href="/static/css/main.e6c13ad2.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
backend/static/static/js/{main.120fc3ad.js → main.cc4bfe13.js} RENAMED
The diff for this file is too large to render. See raw diff
 
backend/static/static/js/{main.120fc3ad.js.LICENSE.txt → main.cc4bfe13.js.LICENSE.txt} RENAMED
File without changes
backend/static/static/js/{main.120fc3ad.js.map → main.cc4bfe13.js.map} RENAMED
The diff for this file is too large to render. See raw diff
 
frontend/src/App.js CHANGED
@@ -17,11 +17,9 @@ function App() {
17
  const [isSolving, setIsSolving] = useState(false);
18
  const [problematicConstraints, setProblematicConstraints] = useState("");
19
 
20
- const FLASK_BASE_URL = 'http://localhost:7860';
21
-
22
  // Frontend fetch sysContent in default
23
  useEffect(() => {
24
- fetch(`${FLASK_BASE_URL}/default_sys_content`)
25
  .then(res => res.json())
26
  .then(data => {
27
  if(data.success) {
@@ -33,7 +31,7 @@ function App() {
33
 
34
  // When puzzleIndex changing,auto get puzzle
35
  useEffect(() => {
36
- fetch(`${FLASK_BASE_URL}/get_puzzle?index=${puzzleIndex}`)
37
  .then(res => res.json())
38
  .then(data => {
39
  if(data.success) {
@@ -63,7 +61,7 @@ function App() {
63
 
64
  setIsSolving(true);
65
 
66
- fetch(`${FLASK_BASE_URL}/solve`, {
67
  method: "POST",
68
  headers: { "Content-Type": "application/json" },
69
  body: JSON.stringify(payload)
@@ -127,7 +125,7 @@ function App() {
127
  <h2>Result</h2>
128
  <p>Success: {executionSuccess === null ? "N/A" : executionSuccess ? "✅" : "❌"}</p>
129
  <p>Attempts: {attempts}</p>
130
- <h3>Problematic Constraints</h3>
131
  <pre>{problematicConstraints}</pre>
132
  <h3>Generated Code</h3>
133
  <pre>{generatedCode}</pre>
 
17
  const [isSolving, setIsSolving] = useState(false);
18
  const [problematicConstraints, setProblematicConstraints] = useState("");
19
 
 
 
20
  // Frontend fetch sysContent in default
21
  useEffect(() => {
22
+ fetch(`/default_sys_content`)
23
  .then(res => res.json())
24
  .then(data => {
25
  if(data.success) {
 
31
 
32
  // When puzzleIndex changing,auto get puzzle
33
  useEffect(() => {
34
+ fetch(`/get_puzzle?index=${puzzleIndex}`)
35
  .then(res => res.json())
36
  .then(data => {
37
  if(data.success) {
 
61
 
62
  setIsSolving(true);
63
 
64
+ fetch(`/solve`, {
65
  method: "POST",
66
  headers: { "Content-Type": "application/json" },
67
  body: JSON.stringify(payload)
 
125
  <h2>Result</h2>
126
  <p>Success: {executionSuccess === null ? "N/A" : executionSuccess ? "✅" : "❌"}</p>
127
  <p>Attempts: {attempts}</p>
128
+ <h3>Issues</h3>
129
  <pre>{problematicConstraints}</pre>
130
  <h3>Generated Code</h3>
131
  <pre>{generatedCode}</pre>