Update app.py
Browse files
app.py
CHANGED
@@ -41,14 +41,6 @@ def image_to_base64(image_path):
|
|
41 |
encoded_string = base64.b64encode(img.read())
|
42 |
return encoded_string.decode('utf-8')
|
43 |
|
44 |
-
def app1_query(img):
|
45 |
-
if not img:
|
46 |
-
return txt_prompt_1
|
47 |
-
base64 = image_to_base64(img)
|
48 |
-
data_url = f"data:image/jpeg;base64,{base64}"
|
49 |
-
outputText = [(f"{txt_display_1} ![]({data_url})", None)]
|
50 |
-
return outputText
|
51 |
-
|
52 |
# Function that takes User Inputs, generates Response and displays on Chat UI
|
53 |
def app1_response(img):
|
54 |
if not img:
|
@@ -60,6 +52,7 @@ def app1_response(img):
|
|
60 |
response = vis_model.generate_content([txt_prompt_1,img])
|
61 |
return response.text
|
62 |
|
|
|
63 |
def send_SMS(resp_text):
|
64 |
url = SMS_URL
|
65 |
headers = {
|
|
|
41 |
encoded_string = base64.b64encode(img.read())
|
42 |
return encoded_string.decode('utf-8')
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
# Function that takes User Inputs, generates Response and displays on Chat UI
|
45 |
def app1_response(img):
|
46 |
if not img:
|
|
|
52 |
response = vis_model.generate_content([txt_prompt_1,img])
|
53 |
return response.text
|
54 |
|
55 |
+
# SMS service ends in March 2024, to restore service @Sinch Simple Text
|
56 |
def send_SMS(resp_text):
|
57 |
url = SMS_URL
|
58 |
headers = {
|