Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
from dotenv import load_dotenv
|
| 2 |
from openai import OpenAI
|
|
|
|
| 3 |
import json
|
| 4 |
import os
|
| 5 |
import requests
|
|
@@ -131,20 +132,38 @@ If the user is engaging in discussion, try to steer them towards getting in touc
|
|
| 131 |
if __name__ == "__main__":
|
| 132 |
me = Me()
|
| 133 |
# gr.ChatInterface(me.chat, type="messages").launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
#profile-col { align-items: center; display: flex; flex-direction: column; padding: 32px 16px 32px 32px; }
|
| 141 |
-
#chat-col { padding: 32px 32px 32px 0; }
|
| 142 |
-
"""
|
| 143 |
-
) as demo:
|
| 144 |
with gr.Row():
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
gr.
|
|
|
|
| 149 |
|
| 150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from dotenv import load_dotenv
|
| 2 |
from openai import OpenAI
|
| 3 |
+
from PIL import Image
|
| 4 |
import json
|
| 5 |
import os
|
| 6 |
import requests
|
|
|
|
| 132 |
if __name__ == "__main__":
|
| 133 |
me = Me()
|
| 134 |
# gr.ChatInterface(me.chat, type="messages").launch()
|
| 135 |
+
# with gr.Blocks(
|
| 136 |
+
# theme=gr.themes.Soft(),
|
| 137 |
+
# css="""
|
| 138 |
+
# body { background: #181c20 !important; }
|
| 139 |
+
# #profile-pic { border-radius: 16px; box-shadow: 0 4px 16px #0005; }
|
| 140 |
+
# #profile-col { align-items: center; display: flex; flex-direction: column; padding: 32px 16px 32px 32px; }
|
| 141 |
+
# #chat-col { padding: 32px 32px 32px 0; }
|
| 142 |
+
# """
|
| 143 |
+
# ) as demo:
|
| 144 |
+
# with gr.Row():
|
| 145 |
+
# with gr.Column(elem_id="profile-col", scale=1):
|
| 146 |
+
# gr.Image("mandalorian_tns.png", elem_id="profile-pic", show_label=False, show_download_button=False, width=240, height=240)
|
| 147 |
+
# with gr.Column(elem_id="chat-col", scale=3):
|
| 148 |
+
# gr.ChatInterface(me.chat, type="messages")
|
| 149 |
+
|
| 150 |
+
# demo.launch()
|
| 151 |
|
| 152 |
+
|
| 153 |
+
with gr.Blocks() as demo:
|
| 154 |
+
resume_image_path = "./me/samson_resume.jpg"
|
| 155 |
+
resume_pdf_path = "./me/samson_resume.pdf"
|
| 156 |
+
bot_avatar_path = "./me/mandalorian_tns.png"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
with gr.Row():
|
| 158 |
+
# Left half: image display
|
| 159 |
+
with gr.Column(scale=1):
|
| 160 |
+
gr.Markdown("### Resume")
|
| 161 |
+
gr.Image(resume_image_path)
|
| 162 |
+
gr.File(value=resume_pdf_path, label="Download Resume", interactive=True)
|
| 163 |
|
| 164 |
+
# Right half: chatbot
|
| 165 |
+
with gr.Column(scale=1):
|
| 166 |
+
gr.Markdown("### Resume Chatbot")
|
| 167 |
+
gr.ChatInterface(me.chat, type="messages")
|
| 168 |
+
|
| 169 |
+
demo.launch()
|