Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,6 +27,14 @@ from langchain.prompts import ChatMessagePromptTemplate
|
|
27 |
from langchain.prompts import ChatPromptTemplate
|
28 |
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
# Base64-encoded images
|
31 |
facebook_icon = get_image_base64("facebook.png")
|
32 |
twitter_icon = get_image_base64("twitter.png")
|
@@ -45,6 +53,7 @@ avatar_9 = get_image_base64("avatar_9.png")
|
|
45 |
avatar_10 = get_image_base64("avatar_10.png")
|
46 |
avatar_11 = get_image_base64("avatar_11.png")
|
47 |
avatar_12 = get_image_base64("avatar_12.png")
|
|
|
48 |
|
49 |
|
50 |
|
@@ -72,13 +81,8 @@ worksheet = sheet.get_worksheet(0)
|
|
72 |
|
73 |
|
74 |
|
75 |
-
# Function to get base64 encoding of an image
|
76 |
-
def get_image_base64(path):
|
77 |
-
with open(path, "rb") as image_file:
|
78 |
-
encoded_string = base64.b64encode(image_file.read()).decode()
|
79 |
-
return encoded_string
|
80 |
|
81 |
-
|
82 |
|
83 |
# Function to create a copy-to-clipboard button
|
84 |
def create_copy_button(text_to_copy):
|
|
|
27 |
from langchain.prompts import ChatPromptTemplate
|
28 |
|
29 |
|
30 |
+
|
31 |
+
# Function to get base64 encoding of an image
|
32 |
+
def get_image_base64(path):
|
33 |
+
with open(path, "rb") as image_file:
|
34 |
+
encoded_string = base64.b64encode(image_file.read()).decode()
|
35 |
+
return encoded_string
|
36 |
+
|
37 |
+
|
38 |
# Base64-encoded images
|
39 |
facebook_icon = get_image_base64("facebook.png")
|
40 |
twitter_icon = get_image_base64("twitter.png")
|
|
|
53 |
avatar_10 = get_image_base64("avatar_10.png")
|
54 |
avatar_11 = get_image_base64("avatar_11.png")
|
55 |
avatar_12 = get_image_base64("avatar_12.png")
|
56 |
+
icon_base64 = get_image_base64("clipboard.png")
|
57 |
|
58 |
|
59 |
|
|
|
81 |
|
82 |
|
83 |
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
+
|
86 |
|
87 |
# Function to create a copy-to-clipboard button
|
88 |
def create_copy_button(text_to_copy):
|