SarowarSaurav commited on
Commit
7541b65
Β·
verified Β·
1 Parent(s): 7c4961c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -39,7 +39,7 @@ def analyze_leaf_disease(image_path, leaf_type):
39
  ),
40
  UserMessage(
41
  content=[
42
- TextContentItem(text="What's the name of the leaf disease in this image and what is the confidence score? What is the probable reason? What are the medicine or stops to prevent the disease"),
43
  ImageContentItem(
44
  image_url=ImageUrl.load(
45
  image_file=image_path,
@@ -95,11 +95,13 @@ with gr.Blocks() as interface:
95
 
96
  with gr.Row():
97
  tts_button = gr.Button("πŸ”Š Read Aloud")
98
- tts_audio = gr.Audio(label="🎧 Audio", autoplay=True)
99
 
100
  translate_button = gr.Button("🌐 Translate to Bangla")
 
 
 
101
  translated_output = gr.Textbox(label="πŸ“˜ Bangla Translation", placeholder="Translation will appear here", lines=10)
102
-
103
  # Button logic
104
  proceed_button.click(handle_proceed, inputs=[image_input, leaf_type], outputs=[detecting_label, output_box])
105
  tts_button.click(text_to_speech, inputs=[output_box], outputs=[tts_audio])
 
39
  ),
40
  UserMessage(
41
  content=[
42
+ TextContentItem(text="What's the name of the leaf disease in this image and what is the confidence score?Just say the Score only. What is the probable reason? What are the medicine or stops to prevent the disease"),
43
  ImageContentItem(
44
  image_url=ImageUrl.load(
45
  image_file=image_path,
 
95
 
96
  with gr.Row():
97
  tts_button = gr.Button("πŸ”Š Read Aloud")
98
+
99
 
100
  translate_button = gr.Button("🌐 Translate to Bangla")
101
+
102
+ with gr.Row():
103
+ tts_audio = gr.Audio(label="🎧 Audio", autoplay=True)
104
  translated_output = gr.Textbox(label="πŸ“˜ Bangla Translation", placeholder="Translation will appear here", lines=10)
 
105
  # Button logic
106
  proceed_button.click(handle_proceed, inputs=[image_input, leaf_type], outputs=[detecting_label, output_box])
107
  tts_button.click(text_to_speech, inputs=[output_box], outputs=[tts_audio])