Spaces:
Sleeping
Sleeping
Kamran Zulfiqar
commited on
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import pandas as pd
|
3 |
+
|
4 |
+
# Page setup
|
5 |
+
st.set_page_config(page_title="AutoCAD Command Reference", layout="wide")
|
6 |
+
|
7 |
+
# Custom background and styling
|
8 |
+
st.markdown("""
|
9 |
+
<style>
|
10 |
+
body {
|
11 |
+
background-color: #e6f0ff;
|
12 |
+
}
|
13 |
+
.title {
|
14 |
+
color: #003366;
|
15 |
+
text-align: center;
|
16 |
+
font-size: 40px;
|
17 |
+
margin-bottom: 20px;
|
18 |
+
}
|
19 |
+
.stApp {
|
20 |
+
background-color: #e6f0ff;
|
21 |
+
}
|
22 |
+
.command-box {
|
23 |
+
background-color: #ffffff;
|
24 |
+
padding: 20px;
|
25 |
+
margin: 10px 0;
|
26 |
+
border-radius: 10px;
|
27 |
+
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
28 |
+
}
|
29 |
+
a {
|
30 |
+
color: #0059b3;
|
31 |
+
font-weight: bold;
|
32 |
+
}
|
33 |
+
</style>
|
34 |
+
""", unsafe_allow_html=True)
|
35 |
+
|
36 |
+
# Title
|
37 |
+
st.markdown('<div class="title">📐 AutoCAD Commands Reference</div>', unsafe_allow_html=True)
|
38 |
+
|
39 |
+
# Sample data (you can expand this)
|
40 |
+
commands = [
|
41 |
+
{
|
42 |
+
"Command": "LINE",
|
43 |
+
"Description": "Creates straight line segments.",
|
44 |
+
"YouTube": "https://www.youtube.com/watch?v=4Hsb5j5JH7A"
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"Command": "CIRCLE",
|
48 |
+
"Description": "Creates a circle.",
|
49 |
+
"YouTube": "https://www.youtube.com/watch?v=ZFbP13bU5Ck"
|
50 |
+
},
|
51 |
+
{
|
52 |
+
"Command": "TRIM",
|
53 |
+
"Description": "Trims objects to meet the edges of other objects.",
|
54 |
+
"YouTube": "https://www.youtube.com/watch?v=8QULwXuHEjM"
|
55 |
+
},
|
56 |
+
{
|
57 |
+
"Command": "EXTEND",
|
58 |
+
"Description": "Extends objects to meet the edges of other objects.",
|
59 |
+
"YouTube": "https://www.youtube.com/watch?v=EYYJSXruK4k"
|
60 |
+
}
|
61 |
+
]
|
62 |
+
|
63 |
+
# Layout in columns
|
64 |
+
cols = st.columns(2)
|
65 |
+
|
66 |
+
for i, cmd in enumerate(commands):
|
67 |
+
col = cols[i % 2]
|
68 |
+
with col:
|
69 |
+
st.markdown(f"""
|
70 |
+
<div class="command-box">
|
71 |
+
<h4>🛠️ {cmd['Command']}</h4>
|
72 |
+
<p>{cmd['Description']}</p>
|
73 |
+
<p><a href="{cmd['YouTube']}" target="_blank">▶️ Watch Tutorial</a></p>
|
74 |
+
</div>
|
75 |
+
""", unsafe_allow_html=True)
|