nicoaspra commited on
Commit
cf12252
·
1 Parent(s): 0664784
Files changed (1) hide show
  1. gcode_analyzer_ui.py +1 -7
gcode_analyzer_ui.py CHANGED
@@ -21,33 +21,27 @@ def format_issues(issues):
21
  return "\n".join(formatted)
22
 
23
  with gr.Blocks() as app:
24
- # Customized introduction and instructions for users
25
  gr.Markdown("""
26
  ### G-code Programming Assistant (v0.1)
27
 
28
- Welcome to the G-code Assistant! This tool is solely for educational purposes, helping you verify and analyze your G-code for potential errors and warnings before actually running it on your machine.
29
 
30
  **Note:** This tool is limited to simple carving operations on a CNC milling machine.
31
 
32
  This is a beta version, and you're free to use it for checking your G-codes. If you encounter any issues or unexpected behavior, please contact the developer at **nico.aspra@bicol-u.edu.ph**.
33
  """)
34
 
35
- # Depth input at the top
36
  depth_input = gr.Number(value=0.1, label="Maximum Depth of Cut", precision=1)
37
 
38
- # G-code input textbox
39
  gcode_input = gr.Textbox(lines=20, label="Input G-code", placeholder="Enter G-code here...")
40
 
41
- # Analyze button positioned immediately after G-code input
42
  analyze_button = gr.Button("Analyze G-code")
43
 
44
- # Output sections displayed below the Analyze button
45
  with gr.Row():
46
  output_errors = gr.Textbox(label="Errors", interactive=False)
47
  output_warnings = gr.Textbox(label="Warnings", interactive=False)
48
  output_config = gr.Textbox(label="Configuration Settings", interactive=False)
49
 
50
- # Define the button click functionality
51
  analyze_button.click(
52
  fn=analyze_gcode,
53
  inputs=[gcode_input, depth_input],
 
21
  return "\n".join(formatted)
22
 
23
  with gr.Blocks() as app:
 
24
  gr.Markdown("""
25
  ### G-code Programming Assistant (v0.1)
26
 
27
+ Welcome to the G-code Assistant! This tool is solely for educational purposes, helping you verify and analyze your G-code for potential errors and warnings before actually running it on your machine.
28
 
29
  **Note:** This tool is limited to simple carving operations on a CNC milling machine.
30
 
31
  This is a beta version, and you're free to use it for checking your G-codes. If you encounter any issues or unexpected behavior, please contact the developer at **nico.aspra@bicol-u.edu.ph**.
32
  """)
33
 
 
34
  depth_input = gr.Number(value=0.1, label="Maximum Depth of Cut", precision=1)
35
 
 
36
  gcode_input = gr.Textbox(lines=20, label="Input G-code", placeholder="Enter G-code here...")
37
 
 
38
  analyze_button = gr.Button("Analyze G-code")
39
 
 
40
  with gr.Row():
41
  output_errors = gr.Textbox(label="Errors", interactive=False)
42
  output_warnings = gr.Textbox(label="Warnings", interactive=False)
43
  output_config = gr.Textbox(label="Configuration Settings", interactive=False)
44
 
 
45
  analyze_button.click(
46
  fn=analyze_gcode,
47
  inputs=[gcode_input, depth_input],