Spaces:
Sleeping
Sleeping
Kamran Zulfiqar
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,70 +1,32 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
.
|
20 |
-
|
21 |
-
|
22 |
-
.
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
padding: 15px;
|
32 |
-
border-radius: 10px;
|
33 |
-
margin-bottom: 15px;
|
34 |
-
box-shadow: 0px 2px 8px rgba(0,0,0,0.1);
|
35 |
-
}
|
36 |
-
.command-name {
|
37 |
-
font-weight: bold;
|
38 |
-
font-size: 20px;
|
39 |
-
color: #003366;
|
40 |
-
}
|
41 |
-
.command-desc {
|
42 |
-
font-size: 15px;
|
43 |
-
color: #333333;
|
44 |
-
}
|
45 |
-
</style>
|
46 |
-
""", unsafe_allow_html=True)
|
47 |
-
|
48 |
-
st.markdown('<div class="title">📘 AutoCAD Commands Reference (200)</div>', unsafe_allow_html=True)
|
49 |
-
|
50 |
-
# Generate 200 sample commands
|
51 |
-
commands = []
|
52 |
-
for i in range(1, 201):
|
53 |
-
commands.append({
|
54 |
-
"Command": f"CMD{i}",
|
55 |
-
"Description": f"This is a description for AutoCAD command CMD{i} used to perform operation {random.choice(['drawing', 'editing', 'modifying', 'viewing'])}."
|
56 |
-
})
|
57 |
-
|
58 |
-
# Layout in two columns
|
59 |
-
col1, col2 = st.columns(2)
|
60 |
-
|
61 |
-
for idx, cmd in enumerate(commands):
|
62 |
-
with (col1 if idx % 2 == 0 else col2):
|
63 |
-
st.markdown(f"""
|
64 |
-
<div class="command-card">
|
65 |
-
<div class="command-name">🛠️ {cmd['Command']}</div>
|
66 |
-
<div class="command-desc">{cmd['Description']}</div>
|
67 |
-
</div>
|
68 |
-
""", unsafe_allow_html=True)
|
69 |
|
70 |
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
# Sample command data (replace or expand with real commands later)
|
4 |
+
commands = {
|
5 |
+
"LINE": {
|
6 |
+
"description": "Creates straight line segments between two points.",
|
7 |
+
"link": "https://www.youtube.com/watch?v=4Hsb5j5JH7A"
|
8 |
+
},
|
9 |
+
"CIRCLE": {
|
10 |
+
"description": "Creates a circle based on a center point and radius.",
|
11 |
+
"link": "https://www.youtube.com/watch?v=ZFbP13bU5Ck"
|
12 |
+
},
|
13 |
+
"TRIM": {
|
14 |
+
"description": "Trims objects to meet the edges of other objects.",
|
15 |
+
"link": "https://www.youtube.com/watch?v=8QULwXuHEjM"
|
16 |
+
},
|
17 |
+
"OFFSET": {
|
18 |
+
"description": "Creates concentric circles, parallel lines, and curves at specified distances.",
|
19 |
+
"link": "https://www.youtube.com/watch?v=3AwYIjvQqek"
|
20 |
+
},
|
21 |
+
"MOVE": {
|
22 |
+
"description": "Moves objects a specified distance in a specified direction.",
|
23 |
+
"link": "https://www.youtube.com/watch?v=gzS4h3rzFeM"
|
24 |
+
},
|
25 |
+
"ROTATE": {
|
26 |
+
"description": "Rotates objects around a base point.",
|
27 |
+
"link": "https://www.youtube.com/watch?v=s7KAMdUHz4E"
|
28 |
+
}
|
29 |
+
# You can add up to 200 commands here
|
30 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
|