Upload app_myQ.py
Browse files- app_myQ.py +18 -15
app_myQ.py
CHANGED
@@ -13,18 +13,21 @@ import pathlib
|
|
13 |
txt_model = genai.GenerativeModel('gemini-pro')
|
14 |
vis_model = genai.GenerativeModel('gemini-pro-vision')
|
15 |
|
16 |
-
txt_prompt_1 = """
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
28 |
"""
|
29 |
|
30 |
txt_display_1 = 'content of the letter: '
|
@@ -176,7 +179,7 @@ def send_SMS(resp_text):
|
|
176 |
# gradio block
|
177 |
with gr.Blocks() as app1:
|
178 |
with gr.Column():
|
179 |
-
gr.Markdown("## 🥷
|
180 |
gr.Markdown("```for email ✉ and/or assigment descriptions ⌦, paste screenshot here...```")
|
181 |
image_box = gr.Image(label="✂ email screen", type="filepath")
|
182 |
btn1 = gr.Button("Generate To-Dos ☑")
|
@@ -226,8 +229,8 @@ with gr.Blocks() as app_quali:
|
|
226 |
|
227 |
|
228 |
with gr.Blocks() as demo:
|
229 |
-
gr.Markdown("## My Quali Metrics ↗️ +
|
230 |
-
gr.TabbedInterface([app_quali, app1], ["➀ My Quali", "➁
|
231 |
|
232 |
demo.queue()
|
233 |
demo.launch()
|
|
|
13 |
txt_model = genai.GenerativeModel('gemini-pro')
|
14 |
vis_model = genai.GenerativeModel('gemini-pro-vision')
|
15 |
|
16 |
+
txt_prompt_1 = """
|
17 |
+
List all the food items found in the image. Each food item should be listed in a separate row within a markdown table titled "Food-Brain Table." This table should have four columns: Seq (Sequence), Food, Brain-Health Impact, and Rec Intake (Recommended Intake).
|
18 |
+
|
19 |
+
In the table:
|
20 |
+
- "Seq" represents the sequence number of the food item.
|
21 |
+
- "Food" denotes the name of the food.
|
22 |
+
- "Brain-Health Impact" describes the positive or negative effects of the food on brain health. For example, it may mention the presence of nutrients like omega-3 fatty acids, which are beneficial for brain health.
|
23 |
+
- "Rec Intake" specifies the recommended frequency or quantity of consumption for each food item.
|
24 |
+
|
25 |
+
Example Food-Brain Table:
|
26 |
+
|
27 |
+
| Seq | Food | Brain-Health Impact | Rec Intake |
|
28 |
+
|-----|---------------|--------------------------------------------------------------------------------------------------------|--------------------------------------|
|
29 |
+
| 1 | Cod | Cod contains abundant sources of omega-3 fatty acids, healthy unsaturated fats that have been linked to lower blood levels of beta-amyloid—the protein that forms damaging clumps in the brains of people with Alzheimer's disease. | At least twice per week|
|
30 |
+
|
31 |
"""
|
32 |
|
33 |
txt_display_1 = 'content of the letter: '
|
|
|
179 |
# gradio block
|
180 |
with gr.Blocks() as app1:
|
181 |
with gr.Column():
|
182 |
+
gr.Markdown("## 🥷 FoodCAM ##")
|
183 |
gr.Markdown("```for email ✉ and/or assigment descriptions ⌦, paste screenshot here...```")
|
184 |
image_box = gr.Image(label="✂ email screen", type="filepath")
|
185 |
btn1 = gr.Button("Generate To-Dos ☑")
|
|
|
229 |
|
230 |
|
231 |
with gr.Blocks() as demo:
|
232 |
+
gr.Markdown("## My Quali Metrics ↗️ + FoodCAM 🥷 ##")
|
233 |
+
gr.TabbedInterface([app_quali, app1], ["➀ My Quali", "➁ FoodCAM"])
|
234 |
|
235 |
demo.queue()
|
236 |
demo.launch()
|