Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 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])
|