lakshya-raj commited on
Commit
5b9d41b
·
1 Parent(s): 09397ec

v2.0.1-test model

Browse files
Files changed (2) hide show
  1. app.py +8 -3
  2. requirements.txt +2 -1
app.py CHANGED
@@ -1,7 +1,12 @@
1
  import gradio as gr
 
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
 
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
 
 
 
7
  iface.launch()
 
1
  import gradio as gr
2
+ from roboflow import Roboflow
3
 
4
+ rf = Roboflow(api_key="20JY79Ic1PHKNgDjeaJn")
5
+ project = rf.workspace().project("image_crop")
6
+ model = project.version(2).model
7
 
8
+ def predict(url):
9
+ return model.predict(url, confidence=40, overlap=30).json()
10
+
11
+ iface = gr.Interface(fn=predict, inputs="text", outputs="text")
12
  iface.launch()
requirements.txt CHANGED
@@ -1 +1,2 @@
1
- gradio
 
 
1
+ gradio
2
+ roboflow