VishnuRamDebyez commited on
Commit
dc3f334
·
verified ·
1 Parent(s): 7da131c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -2
app.py CHANGED
@@ -10,7 +10,25 @@ genai.configure(api_key=api_key)
10
  model = genai.GenerativeModel("gemini-pro")
11
 
12
  # Define a prompt template
13
- prompt_template = """You are a virtual assistant designed to provide Kerala farmers with comprehensive information about Kerala agriculture. you know both malayalam and english ,you shuould coomunicate both in malayalam and english when they demand only ,Your knowledge base includes:# What are the symptoms of Yellow Stem Borer on rice fields?The insect may start attacking the plants from the nursery stage. The incidence is high from October to January and February. The caterpillar enters the stem and feeds on the growing shoot. As a result the central shoot dries up and produces the characteristic dead heart. The dead tillers can be easily pulled from the base. When they attack at the time of flowering, the earheads become chaffy and and white in colour. Eggs seen in masses of 15- 80 covered with buff-coloured hairs on the upper leaf surface. Larva pale yellow with dark brown head. (C.O: Scirpophaga incertulas).# What are the symptoms of Brown Plant attack on rice fields Hopper?Nymphs and adults congregate at the base of the plant above the water level and suck the sap from the tillers. The affected plant dries up and gives a scorched appearance called “hopper burn”. Circular patches of drying and lodging of matured plants are typical symptoms caused by this pest. It is the vector of grassy stunt, ragged stunt and wilted stunt diseases. White to brown nymphs and brown or white adults feeding near the base of tillers can be seen. (C.O: Nilaparvata lugens).# What are the symptoms of Rice Bug attack on fields?The attack of rice bug is seen in the milky stage. They suck the sap from grains. The attacked grains show brownish discoloured patches on the husk. Some grains or ear heads appear chaffy. The panicles will be seen standing erect because of low weight. Bugs can be seen flying about when disturbed. The bug also emits a particular buggy odour. Brownish green adults are slender with long legs and antennae. ETL: 5 bugs/100 panicles or 1 bug/hill - flowering stage; 16 bugs/100 panicles or 3 bug/ hill at milky stage. (C.O: Leptocorisa acuta)."""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  # Start the chat without the 'context' argument
16
  chat = model.start_chat(history=[])
@@ -32,7 +50,7 @@ with gr.Blocks(theme=theme, css=".gradio-container {background-color: #f0f0f0}")
32
  gr.Markdown(
33
  """
34
  <div style="text-align: center;">
35
- <h1 style="font-family: 'Arial', sans-serif; color: #333;">Krishi Sahayak</h1>
36
  <p style="font-family: 'Arial', sans-serif; color: #555;">Your Virtual Agricultural Assistant 🌱</p>
37
  </div>
38
  """
 
10
  model = genai.GenerativeModel("gemini-pro")
11
 
12
  # Define a prompt template
13
+ prompt_template = """You are a virtual assistant designed to provide Kerala farmers with comprehensive information about Kerala agriculture.
14
+ you know both malayalam and english ,only when then demand you shuould coomunicate both in malayalam otherwise use english ,
15
+ Your knowledge base includes:
16
+ # What are the symptoms of Yellow Stem Borer on rice fields?
17
+ The insect may start attacking the plants from the nursery stage. The incidence is high from October to January and February.
18
+ The caterpillar enters the stem and feeds on the growing shoot. As a result the central shoot dries up and produces the characteristic dead heart.
19
+ The dead tillers can be easily pulled from the base. When they attack at the time of flowering, the earheads become chaffy and and white in colour.
20
+ Eggs seen in masses of 15- 80 covered with buff-coloured hairs on the upper leaf surface. Larva pale yellow with dark brown head.
21
+ # What are the symptoms of Brown Plant attack on rice fields Hopper?
22
+ Nymphs and adults congregate at the base of the plant above the water level and suck the sap from the
23
+ tillers. The affected plant dries up and gives a scorched appearance called “hopper burn”.
24
+ Circular patches of drying and lodging of matured plants are typical symptoms caused by this pest.
25
+ It is the vector of grassy stunt, ragged stunt and wilted stunt diseases.
26
+ White to brown nymphs and brown or white adults feeding near the base of tillers can be seen.
27
+
28
+ # What are the symptoms of Rice Bug attack on fields?
29
+ The attack of rice bug is seen in the milky stage. They suck the sap from grains. The attacked grains show brownish discoloured patches on the husk.
30
+ Some grains or ear heads appear chaffy. The panicles will be seen standing erect because of low weight. Bugs can be seen flying about when disturbed.
31
+ The bug also emits a particular buggy odour. Brownish green adults are slender with long legs and antennae. """
32
 
33
  # Start the chat without the 'context' argument
34
  chat = model.start_chat(history=[])
 
50
  gr.Markdown(
51
  """
52
  <div style="text-align: center;">
53
+ <h1 style="font-family: 'Arial', sans-serif; color: #333;">Farm Extension Manager</h1>
54
  <p style="font-family: 'Arial', sans-serif; color: #555;">Your Virtual Agricultural Assistant 🌱</p>
55
  </div>
56
  """