nicoaspra commited on
Commit
d554b02
·
1 Parent(s): 7258672

remove streamlit.py

Browse files
gcode_analyzer_ui copy.py → UI_gradio.py RENAMED
File without changes
gcode_analyzer_ui.py CHANGED
@@ -1,5 +1,3 @@
1
- # app.py
2
-
3
  import streamlit as st
4
  from python_gcode_checker import run_checks
5
  from settings_report_details import generate_detailed_report
 
 
 
1
  import streamlit as st
2
  from python_gcode_checker import run_checks
3
  from settings_report_details import generate_detailed_report
streamlit.py DELETED
@@ -1,50 +0,0 @@
1
- # app.py
2
-
3
- import streamlit as st
4
- from python_gcode_checker import run_checks
5
- from settings_report_details import generate_detailed_report
6
-
7
- # Title and description
8
- st.title("G-code Programming Assistant (v0.1)")
9
-
10
- st.markdown("""
11
- 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.
12
-
13
- **Note:** This tool is limited to simple carving operations on a CNC milling machine.
14
-
15
- 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**.
16
- """)
17
-
18
- # Input for maximum depth of cut
19
- depth_max = st.number_input("Maximum Depth of Cut", min_value=0.0, value=0.1, step=0.1, format="%.1f")
20
-
21
- # Text area for G-code input
22
- gcode_input = st.text_area("Input G-code", height=300, placeholder="Enter G-code here...")
23
-
24
- # Button to analyze G-code
25
- if st.button("Analyze G-code"):
26
- # Run analysis functions
27
- errors, warnings = run_checks(gcode_input, depth_max)
28
- config_report = generate_detailed_report(gcode_input)
29
-
30
- # Display results
31
- st.subheader("Analysis Results")
32
-
33
- # Display errors and warnings in a formatted way
34
- if errors:
35
- st.error(f"Errors: {len(errors)}\n" + "\n".join(f"Line {line}: {msg}" for line, msg in errors))
36
- else:
37
- st.success("No errors found.")
38
-
39
- if warnings:
40
- st.warning(f"Warnings: {len(warnings)}\n" + "\n".join(f"Line {line}: {msg}" for line, msg in warnings))
41
- else:
42
- st.info("No warnings found.")
43
-
44
- # Display configuration report
45
- st.subheader("Configuration Settings")
46
- st.text(config_report)
47
-
48
- # Footer
49
- st.markdown("---")
50
- st.markdown("Developed by **Aspra, N.**")