hsienchen commited on
Commit
5f46732
1 Parent(s): 6c06e92

Upload app_myQ.py

Browse files
Files changed (1) hide show
  1. 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 = """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:
17
-
18
- # Sender and Subject #
19
- 1- Action 1 (no more than 20 words)
20
- 2- Action 2 (no more than 20 words)
21
- 3- Action 3 (no more than 20 words)
22
-
23
- For example:
24
- # From Richard regarding 'Shipping to Customer ABC' #
25
- 1- Pack Product A
26
- 2- Ship before 3:00 PM today
27
- 3- Notify Richard after shipment
 
 
 
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("## 🥷 to Samuraize ##")
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 ↗️ + Samurizer-Text 🥷 ##")
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()