OttoYu commited on
Commit
323afc2
1 Parent(s): ca6a953

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -20
app.py CHANGED
@@ -1,21 +1,4 @@
1
  import gradio as gr
2
-
3
- def change_textbox(choice):
4
- if choice == "Condition":
5
- return gr.Interface.load("models/OttoYu/Tree-ConditionHK", title="🌳 Tree Condition Classification 樹況分類 (bilingual)",description="This online application covers 22 most typical tree disease over 290+ images. If you find any trees that has hidden injures, you can classifies with our model and report the tree condition via this form (https://rb.gy/c1sfja). 此在線程式涵蓋22種官方部門樹況分類的標準,超過290張圖像。如果您發現任何樹木有隱傷,您可以使用我們的模型進行分類並通過此表格報告樹木狀況。")model.launch()
6
- elif choice == "Classification":
7
- return model=gr.Interface.load("models/OttoYu/TreeClassification", title="🌳 Tree Classification by Simple machine learning", description="This web application can identify trees with only one image upload. Since this application is on trial, if you find any errors, please contact exottoyu@gmail.com.") .launch()
8
- else:
9
- return gr.Interface.load("models/OttoYu/TreeDisease", title="🦠 Tree Disease Classification 樹木病害分類 (bilingual)", description="This online application covers 22 most typical tree disease over 140+ images. 此應用程式涵蓋 22 種最典型的樹木病害,超過 140 張圖像。").launch()
10
-
11
- with gr.Blocks() as demo:
12
- radio = gr.Radio(
13
- ["Condition","Classification","Disease"], label=“s”
14
- )
15
- text = gr.Textbox(lines=2, interactive=True).style(show_copy_button=True)
16
-
17
- radio.change(fn=change_textbox, inputs=radio, outputs=text)
18
-
19
-
20
- if __name__ == "__main__":
21
- demo.launch()
 
1
  import gradio as gr
2
+ gr.Interface.load("models/OttoYu/TreeDisease",
3
+ title="🦠 Tree Disease Classification 樹木病害分類 (bilingual)",
4
+ description="This online application covers 22 most typical tree disease over 140+ images. 此應用程式涵蓋 22 種最典型的樹木病害,超過 140 張圖像。").launch()