Spaces:
Running
Running
add section 3
Browse files
README.md
CHANGED
@@ -52,6 +52,22 @@ Here’s we define our image classification model prediction function in PyTorch
|
|
52 |
</pre>
|
53 |
</p>
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
<p class="lg:col-span-2">
|
56 |
Accepted demos will be accessible either through the virtual CVPR website or the physical CVPR event (or both if applicable). Papers describing accepted demonstrations will be published in the CVPR conference proceedings (Demo Track).
|
57 |
|
|
|
52 |
</pre>
|
53 |
</p>
|
54 |
|
55 |
+
<h3 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">3. Then create a Gradio Interface using the function and the appropriate input and output types
|
56 |
+
</h3>
|
57 |
+
<p class="lg:col-span-2">
|
58 |
+
For the image classification model from Step 2, it would like like this:
|
59 |
+
<pre>
|
60 |
+
<code>
|
61 |
+
inputs = gr.inputs.Image()
|
62 |
+
|
63 |
+
outputs = gr.outputs.Label(num_top_classes=3)
|
64 |
+
|
65 |
+
io = gr.Interface(fn=predict, inputs=inputs, outputs=outputs)
|
66 |
+
</code>
|
67 |
+
</pre>
|
68 |
+
If you need help creating a Gradio Interface for your model, check out the Gradio Getting Started guide.
|
69 |
+
</p>
|
70 |
+
|
71 |
<p class="lg:col-span-2">
|
72 |
Accepted demos will be accessible either through the virtual CVPR website or the physical CVPR event (or both if applicable). Papers describing accepted demonstrations will be published in the CVPR conference proceedings (Demo Track).
|
73 |
|