25 multiple-choice on deploying FastAI models with Gradio and Hugging Face Spaces, plus 5 short-answer questions.
Select the single best answer for each question. Each question is worth 1 mark.
learn.export("model.pkl") in FastAI saves:
To load a FastAI exported model for inference, you use:
Hugging Face Spaces is primarily used for:
In Gradio, gr.Interface(fn, inputs, outputs) — what does fn represent?
What does learn.predict(img) return?
FastAI exports models using which file format by default?
What is a key advantage of deploying a model on Hugging Face Spaces over a local machine?
In a Gradio interface for an image classifier, which input component is most appropriate?
The file that Hugging Face Spaces looks for to run a Gradio app is:
PILImage.create(img) is used in FastAI inference to:
learn.dls.vocab contains:
What is the difference between model weights and model architecture?
Latency in model serving refers to:
The examples= argument in gr.Interface provides:
Inference in the context of a trained model means:
requirements.txt in a deployed app lists:
CPU inference is sometimes preferred over GPU inference when:
What is the purpose of gr.Label() as a Gradio output component?
When a FastAI load_learner model processes an image through learn.predict(), it automatically applies:
A Gradio gr.Interface with live=True means:
Which of the following best describes model quantisation?
What is the role of a README.md in a Hugging Face Space repository?
After calling learn.export(), the exported file contains enough information to:
In a production recommender system, the model is typically served via:
Which of the following is the correct way to call a FastAI model on a new image in an inference script?
Answer each question in 2–4 sentences. Precise technical language is expected. Code snippets are welcome where relevant.
Describe the end-to-end process of deploying a FastAI image classifier to Hugging Face Spaces using Gradio. What files are needed and what does each contain?written
What is the difference between learn.export() and saving only the model weights with torch.save()? When would you use each?written
Explain what happens step-by-step when a user uploads an image to a deployed Gradio app backed by a FastAI classifier — from the browser click to the displayed result.written
What are three important practical considerations when deploying a deep learning model to a public-facing web application?written
What is model latency and throughput? Why might there be a tradeoff between them, and how would you address this tradeoff in a high-traffic application?written
Complete all 30 questions then click Submit. Your MCQ score (25/25) will be shown. Short answers are marked separately.