Srikesh commited on
Commit
e3f83ec
·
verified ·
1 Parent(s): 269337f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -24
app.py CHANGED
@@ -1,26 +1,10 @@
1
  import gradio as gr
2
 
3
- with gr.Blocks(fill_height=True, theme="default") as demo:
4
- with gr.Row():
5
- with gr.Column(scale=1):
6
- with gr.Accordion("About", open=True):
7
- gr.Markdown("### 🌱 Plant Disease Detection Demo")
8
- gr.Markdown(
9
- "This Space uses the **[Diginsa/Plant-Disease-Detection-Project](https://huggingface.co/Diginsa/Plant-Disease-Detection-Project)** model "
10
- "served via the **Hugging Face Inference API**.\n\n"
11
- "Sign in with your Hugging Face account to run predictions."
12
- )
13
- login_btn = gr.LoginButton("🔑 Sign in with Hugging Face", variant="primary")
14
-
15
- with gr.Column(scale=3):
16
- gr.Markdown("### Upload an Image to Detect Plant Disease")
17
- # Load the Hugging Face model directly into the Gradio interface
18
- gr.load(
19
- "models/Diginsa/Plant-Disease-Detection-Project",
20
- accept_token=login_btn,
21
- provider="hf-inference",
22
- height=600
23
- )
24
-
25
- if __name__ == "__main__":
26
- demo.launch()
 
1
  import gradio as gr
2
 
3
+ with gr.Blocks(fill_height=True) as demo:
4
+ with gr.Sidebar():
5
+ gr.Markdown("# Inference Provider")
6
+ gr.Markdown("This Space showcases the Diginsa/Plant-Disease-Detection-Project model, served by the hf-inference API. Sign in with your Hugging Face account to use this API.")
7
+ button = gr.LoginButton("Sign in")
8
+ gr.load("models/Diginsa/Plant-Disease-Detection-Project", accept_token=button, provider="hf-inference")
9
+
10
+ demo.launch()