Spaces:
Sleeping
Sleeping
Upload appFinal.py
Browse files- appFinal.py +39 -5
appFinal.py
CHANGED
|
@@ -72,6 +72,34 @@ APP_CSS = """
|
|
| 72 |
.gradio-container details summary {
|
| 73 |
line-height: 1.45 !important;
|
| 74 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
""".strip()
|
| 76 |
|
| 77 |
logging.basicConfig(
|
|
@@ -905,7 +933,10 @@ def create_app():
|
|
| 905 |
render=False,
|
| 906 |
)
|
| 907 |
|
| 908 |
-
with gr.Row(
|
|
|
|
|
|
|
|
|
|
| 909 |
if PROFILE_IMAGE.exists():
|
| 910 |
gr.Image(
|
| 911 |
value=str(PROFILE_IMAGE),
|
|
@@ -917,11 +948,14 @@ def create_app():
|
|
| 917 |
interactive=False,
|
| 918 |
scale=0,
|
| 919 |
min_width=60,
|
|
|
|
| 920 |
)
|
| 921 |
-
gr.
|
| 922 |
-
|
| 923 |
-
|
| 924 |
-
|
|
|
|
|
|
|
| 925 |
|
| 926 |
gr.ChatInterface(
|
| 927 |
fn=respond_ai,
|
|
|
|
| 72 |
.gradio-container details summary {
|
| 73 |
line-height: 1.45 !important;
|
| 74 |
}
|
| 75 |
+
.app-title-row {
|
| 76 |
+
align-items: center !important;
|
| 77 |
+
flex-wrap: nowrap !important;
|
| 78 |
+
justify-content: center !important;
|
| 79 |
+
gap: 12px !important;
|
| 80 |
+
}
|
| 81 |
+
.app-title-image {
|
| 82 |
+
flex: 0 0 60px !important;
|
| 83 |
+
margin: 0 !important;
|
| 84 |
+
min-width: 60px !important;
|
| 85 |
+
width: 60px !important;
|
| 86 |
+
}
|
| 87 |
+
.app-title-image img {
|
| 88 |
+
border-radius: 6px !important;
|
| 89 |
+
height: 60px !important;
|
| 90 |
+
object-fit: cover !important;
|
| 91 |
+
width: 60px !important;
|
| 92 |
+
}
|
| 93 |
+
.app-title-text {
|
| 94 |
+
flex: 0 0 auto !important;
|
| 95 |
+
margin: 0 !important;
|
| 96 |
+
min-width: 0 !important;
|
| 97 |
+
padding: 0 !important;
|
| 98 |
+
width: auto !important;
|
| 99 |
+
}
|
| 100 |
+
.app-title-text h1 {
|
| 101 |
+
margin: 0 !important;
|
| 102 |
+
}
|
| 103 |
""".strip()
|
| 104 |
|
| 105 |
logging.basicConfig(
|
|
|
|
| 933 |
render=False,
|
| 934 |
)
|
| 935 |
|
| 936 |
+
with gr.Row(
|
| 937 |
+
equal_height=True,
|
| 938 |
+
elem_classes=["app-title-row"],
|
| 939 |
+
):
|
| 940 |
if PROFILE_IMAGE.exists():
|
| 941 |
gr.Image(
|
| 942 |
value=str(PROFILE_IMAGE),
|
|
|
|
| 948 |
interactive=False,
|
| 949 |
scale=0,
|
| 950 |
min_width=60,
|
| 951 |
+
elem_classes=["app-title-image"],
|
| 952 |
)
|
| 953 |
+
with gr.Column(
|
| 954 |
+
scale=0,
|
| 955 |
+
min_width=0,
|
| 956 |
+
elem_classes=["app-title-text"],
|
| 957 |
+
):
|
| 958 |
+
gr.Markdown("# Rajan's Digital Twin")
|
| 959 |
|
| 960 |
gr.ChatInterface(
|
| 961 |
fn=respond_ai,
|