Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,77 +48,54 @@ if not os.path.exists(FAISS_INDEX_DIR):
|
|
| 48 |
# Dictionary to store user-specific vectorstores
|
| 49 |
user_vectorstores = {}
|
| 50 |
|
| 51 |
-
# Custom CSS for Tech theme
|
| 52 |
custom_css = """
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
-
|
| 59 |
-
|
| 60 |
-
--
|
| 61 |
-
-
|
|
|
|
|
|
|
|
|
|
| 62 |
}
|
| 63 |
|
| 64 |
-
|
| 65 |
-
background
|
| 66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
}
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
}
|
| 74 |
-
|
| 75 |
-
.header {
|
| 76 |
-
background-color: var(--white);
|
| 77 |
-
border-bottom: 1px solid var(--border-color);
|
| 78 |
-
padding: 15px 0;
|
| 79 |
-
margin-bottom: 20px;
|
| 80 |
-
border-radius: 12px 12px 0 0;
|
| 81 |
-
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
|
| 82 |
-
}
|
| 83 |
-
|
| 84 |
-
.header-title {
|
| 85 |
-
color: var(--primary-color);
|
| 86 |
-
font-size: 1.8rem;
|
| 87 |
-
font-weight: 700;
|
| 88 |
-
text-align: center;
|
| 89 |
-
}
|
| 90 |
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
margin-top: 5px;
|
| 96 |
}
|
| 97 |
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
|
| 101 |
-
background-color: var(--white) !important;
|
| 102 |
-
border: 1px solid var(--border-color) !important;
|
| 103 |
-
min-height: 500px;
|
| 104 |
}
|
| 105 |
|
| 106 |
-
|
| 107 |
-
background
|
| 108 |
-
border-radius:
|
| 109 |
-
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
| 110 |
-
padding: 15px;
|
| 111 |
-
margin-bottom: 20px;
|
| 112 |
}
|
| 113 |
|
| 114 |
-
|
| 115 |
-
background
|
| 116 |
-
padding: 12px;
|
| 117 |
-
border-radius: 8px;
|
| 118 |
-
font-family: 'Roboto Mono', monospace;
|
| 119 |
-
overflow-x: auto;
|
| 120 |
-
margin: 10px 0;
|
| 121 |
-
border-left: 3px solid var(--primary-color);
|
| 122 |
}
|
| 123 |
"""
|
| 124 |
|
|
@@ -648,13 +625,15 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
|
|
| 648 |
|
| 649 |
# Add footer with attribution
|
| 650 |
gr.HTML("""
|
| 651 |
-
<div style="text-align: center; margin-top: 20px; padding:
|
| 652 |
-
Created by Calvin Allen
|
|
|
|
| 653 |
</div>
|
| 654 |
""")
|
| 655 |
|
| 656 |
-
# Launch the app
|
| 657 |
if __name__ == "__main__":
|
|
|
|
| 658 |
demo.launch()
|
| 659 |
|
| 660 |
# Add new helper functions
|
|
|
|
| 48 |
# Dictionary to store user-specific vectorstores
|
| 49 |
user_vectorstores = {}
|
| 50 |
|
| 51 |
+
# Custom CSS for Tech theme with modern UI enhancements
|
| 52 |
custom_css = """
|
| 53 |
+
@import url('shared-base.css');
|
| 54 |
+
|
| 55 |
+
/* Tech Vision Specific */
|
| 56 |
+
.code-block {
|
| 57 |
+
background: var(--surface-2);
|
| 58 |
+
border-radius: var(--radius-md);
|
| 59 |
+
padding: var(--spacing-md);
|
| 60 |
+
color: var(--text-color);
|
| 61 |
+
font-family: 'JetBrains Mono', monospace;
|
| 62 |
+
margin: var(--spacing-md) 0;
|
| 63 |
+
border-left: 3px solid var(--accent-color);
|
| 64 |
+
box-shadow: var(--shadow-sm);
|
| 65 |
}
|
| 66 |
|
| 67 |
+
.stats-card {
|
| 68 |
+
background: var(--surface-2);
|
| 69 |
+
color: var(--text-color);
|
| 70 |
+
padding: var(--spacing-md);
|
| 71 |
+
border-radius: var(--radius-md);
|
| 72 |
+
margin: var(--spacing-md) 0;
|
| 73 |
+
border: 1px solid var(--border-color);
|
| 74 |
+
box-shadow: var(--shadow-sm);
|
| 75 |
}
|
| 76 |
|
| 77 |
+
/* Tech-specific accents */
|
| 78 |
+
.function-name { color: var(--accent-color); }
|
| 79 |
+
.keyword { color: var(--accent-color-alt); }
|
| 80 |
+
.string { color: var(--text-color-secondary); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
|
| 82 |
+
/* Custom Scrollbar */
|
| 83 |
+
::-webkit-scrollbar {
|
| 84 |
+
width: 8px;
|
| 85 |
+
height: 8px;
|
|
|
|
| 86 |
}
|
| 87 |
|
| 88 |
+
::-webkit-scrollbar-track {
|
| 89 |
+
background: var(--surface-1);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
}
|
| 91 |
|
| 92 |
+
::-webkit-scrollbar-thumb {
|
| 93 |
+
background: var(--accent-color);
|
| 94 |
+
border-radius: var(--radius-sm);
|
|
|
|
|
|
|
|
|
|
| 95 |
}
|
| 96 |
|
| 97 |
+
::-webkit-scrollbar-thumb:hover {
|
| 98 |
+
background: var(--accent-color-alt);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
}
|
| 100 |
"""
|
| 101 |
|
|
|
|
| 625 |
|
| 626 |
# Add footer with attribution
|
| 627 |
gr.HTML("""
|
| 628 |
+
<div style="text-align: center; margin-top: 20px; padding: 20px; color: #666; font-size: 0.9rem; border-top: 1px solid #eee;">
|
| 629 |
+
Created by Calvin Allen-Crawford<br>
|
| 630 |
+
<span style="font-style: italic; font-size: 0.8rem;">Founder of Cosmick Visions</span>
|
| 631 |
</div>
|
| 632 |
""")
|
| 633 |
|
| 634 |
+
# Launch the app with modern UI
|
| 635 |
if __name__ == "__main__":
|
| 636 |
+
demo = create_interface()
|
| 637 |
demo.launch()
|
| 638 |
|
| 639 |
# Add new helper functions
|