Lesson 2 official topic

Try refreshing the page! Perhaps, the image got stuck loading. It is working from my end as well as mentioned by @galopy.
Cat:

Dog:

1 Like

Hi, I’m trying to follow the steps to create the app “minimal” of the video. I’ve installed Windows Terminal and Visual Studio Code and I’m working with Ubuntu.
I’m following the tutorial Get Started using VS Code with WSL. In the section “Update your Linux distribution” it is suggested to install wget and ca-certificates. My question is about ca-certificates, do I need to install it in order to create the apps for this lesson?
As far as I understand ca-certificates are related to security with credit cards, usernames and passwords we put in web pages, that’s why I think it’s not necessary for what I wish to do at this moment.
So, could you please tell me whether I should install it? Or if it doesn’t matter if I install ca-certificates now because I will need it eventually.

Ok, thank you! It’s good to know that you cannot easily break things by installing into the base environment.

Yes, I am thinking that a pre-trained model would not need the GPU acceleration, and therefore might be ok to run on a Mac (for the reason you mention) even if the library overall isn’t fully supported. So my question is about checking my understanding on that. Is that a correct notion?

1 Like

If there is someone with the same doubt, what I did was install ca-certificates anyway
(as explained in the tutorial I mentioned before) and everything worked fine, I could have the app “minimal” running in production with the help of vs code.
Next step: Have my deep learning model running in production. :smiley:

ok, so here is Jeremy stating that the GPU in only needed to train the model, so that’s the answer to the first half of my question :slight_smile:

Hi Everyone,

Here is my little architecture classifier app: Architecture Classifier - a Hugging Face Space by seandokko

2 Likes

Hi, is this Dogs v Cats notebook available to train a model to make predictions?

The notebook above follows training the model here:

But I don’t see a link to the top one anywhere.

@brooksjordan I’m not sure, but have you tried the next lesson?

This step seems well worth learning.

I’ve recreated Dogs v Cats from the video in case anyone needs it:

Was looking around for a fix for this too!

This is working perfectly. From Colab, simply specifying a Google Drive folder’s path as the data argument is now downloading & extracting the data into that folder.

This is convenient for browsing the images using the Google Drive web app (PFA screenshot).

The code below gives the following output:

(#200) [None,None,None,None,None,None,None,None,None,None...]

Why is the function not fetching the URLS properly?

#hide
! [ -e /content ] && pip install -Uqq fastbook
import fastbook
fastbook.setup_book()

#hide
from fastbook import *
from fastai.vision.widgets import *

results = search_images_ddg('grizzly bear')
ims = results.attrgot('contentUrl')

ims

I’m trying to figure out how the f strings work when we create labels for our prediction models.

In this snippet from the f string, what does .04f refer to? I know that probs[pred_idx] is the dictionary key. What does .04f mean in terms of the value?

Probability: {probs[pred_idx]:.04f}

Nevermind - realized it was a precision type specifier - python - Fixed digits after decimal with f-strings - Stack Overflow

1 Like

Hello , I am trying to deploy a model to hugging face spaces using gradio interference but it is showing that gradio.inputs and gradio.outputs --these functions are deprecated , I dont know how to work with gradio.components ,tried to google it but wasn’t helpful… please find the attached image, can someone please help?

if you want to refer my Kaggle notebook and help me find what was wrong,please refer my notebook

Trying removing .‘inputs’ and .‘outputs’

Deprecated API Recommended API
gr.inputs.Image gr.Image
gr.outputs.Label gr.Label

per this Do not use gradio.inputs and gradio.outputs! · Issue #1835 · gradio-app/gradio · GitHub

2 Likes

@AllenK , Thanks for your help.

I tried it , its not showing the error but still am not able to access the local URL
http://127.0.0.1:7860
could you please help

gradio4

link to my kaggle notebook is in this post:

As you are using on Kaggle you won’t be able to access via the local link.

But the good news is that you have two options to help with that.
In the launch() function you can

  1. set inline=True , # this will display the gradio interface in your jupyer notebook
  2. set share=True # this will give you another link (public & temporary) that you can access.

intf.launch(inline=True, share=True)

2 Likes

Hi there,

My question is: If I train a model to recognize an airplane, what images should I keep and which to delete? Here is an screenshot with some confusing images:

So should a toy or a curtail or a shirt that has a plain painted on top be deleted or kept? Or should some airplane photos that only show parts of the airplane (like the wing or the inside of it) be kept or deleted? Why?

Thank you for your reply!