Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ import pathlib
|
|
10 |
txt_model = genai.GenerativeModel('gemini-pro')
|
11 |
vis_model = genai.GenerativeModel('gemini-pro-vision')
|
12 |
|
13 |
-
txt_prompt_1 = """The image contains the
|
14 |
|
15 |
# Sender and Subject #
|
16 |
1- Action 1 (no more than 20 words)
|
@@ -24,7 +24,7 @@ For example:
|
|
24 |
3- Notify Richard after shipment
|
25 |
"""
|
26 |
|
27 |
-
txt_display_1 = '
|
28 |
|
29 |
import os
|
30 |
|
@@ -94,17 +94,14 @@ with gr.Blocks(theme='snehilsanyal/scikit-learn') as app1:
|
|
94 |
with gr.Column():
|
95 |
outputbox = gr.Textbox(label="here are the plans...")
|
96 |
image_box = gr.Image(type="filepath")
|
97 |
-
|
98 |
-
scale = 2,
|
99 |
-
height=750
|
100 |
-
)
|
101 |
btn = gr.Button("Make a Plan")
|
102 |
clicked = btn.click(app1_query,
|
103 |
-
|
104 |
-
|
105 |
).then(app1_response,
|
106 |
-
|
107 |
-
|
108 |
)
|
109 |
gr.Markdown("""
|
110 |
# Make a Plan #
|
|
|
10 |
txt_model = genai.GenerativeModel('gemini-pro')
|
11 |
vis_model = genai.GenerativeModel('gemini-pro-vision')
|
12 |
|
13 |
+
txt_prompt_1 = """The image contains the contents of a letter. I'd like to follow the request mentioned in the letter. Please provide 3 actionable items to assist me. When responding, use the following format:
|
14 |
|
15 |
# Sender and Subject #
|
16 |
1- Action 1 (no more than 20 words)
|
|
|
24 |
3- Notify Richard after shipment
|
25 |
"""
|
26 |
|
27 |
+
txt_display_1 = 'content of instructions on what to do.'
|
28 |
|
29 |
import os
|
30 |
|
|
|
94 |
with gr.Column():
|
95 |
outputbox = gr.Textbox(label="here are the plans...")
|
96 |
image_box = gr.Image(type="filepath")
|
97 |
+
|
|
|
|
|
|
|
98 |
btn = gr.Button("Make a Plan")
|
99 |
clicked = btn.click(app1_query,
|
100 |
+
[image_box],
|
101 |
+
outputbox
|
102 |
).then(app1_response,
|
103 |
+
[image_box],
|
104 |
+
outputbox
|
105 |
)
|
106 |
gr.Markdown("""
|
107 |
# Make a Plan #
|