CP3501 · Week 3 Model Deployment, Gradio & Hugging Face Quiz
0 / 30
Week 3  ·  Assessment Quiz

Model Deployment, Gradio & Hugging Face

25 multiple-choice on deploying FastAI models with Gradio and Hugging Face Spaces, plus 5 short-answer questions.

📋 30 questions total ⭐ 30 marks 🕐 No time limit 🔒 Answers not revealed
PART A

Multiple Choice  (25 marks)

Select the single best answer for each question. Each question is worth 1 mark.

Q1

learn.export("model.pkl") in FastAI saves:

Q2

To load a FastAI exported model for inference, you use:

Q3

Hugging Face Spaces is primarily used for:

Q4

In Gradio, gr.Interface(fn, inputs, outputs) — what does fn represent?

Q5

What does learn.predict(img) return?

Q6

FastAI exports models using which file format by default?

Q7

What is a key advantage of deploying a model on Hugging Face Spaces over a local machine?

Q8

In a Gradio interface for an image classifier, which input component is most appropriate?

Q9

The file that Hugging Face Spaces looks for to run a Gradio app is:

Q10

PILImage.create(img) is used in FastAI inference to:

Q11

learn.dls.vocab contains:

Q12

What is the difference between model weights and model architecture?

Q13

Latency in model serving refers to:

Q14

The examples= argument in gr.Interface provides:

Q15

Inference in the context of a trained model means:

Q16

requirements.txt in a deployed app lists:

Q17

CPU inference is sometimes preferred over GPU inference when:

Q18

What is the purpose of gr.Label() as a Gradio output component?

Q19

When a FastAI load_learner model processes an image through learn.predict(), it automatically applies:

Q20

A Gradio gr.Interface with live=True means:

Q21

Which of the following best describes model quantisation?

Q22

What is the role of a README.md in a Hugging Face Space repository?

Q23

After calling learn.export(), the exported file contains enough information to:

Q24

In a production recommender system, the model is typically served via:

Q25

Which of the following is the correct way to call a FastAI model on a new image in an inference script?

PART B

Short Answer  (5 marks — marked by lecturer)

Answer each question in 2–4 sentences. Precise technical language is expected. Code snippets are welcome where relevant.

Q26

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

Your answer
0 / 700
Q27

What is the difference between learn.export() and saving only the model weights with torch.save()? When would you use each?written

Your answer
0 / 700
Q28

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

Your answer
0 / 700
Q29

What are three important practical considerations when deploying a deep learning model to a public-facing web application?written

Your answer
0 / 700
Q30

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

Your answer
0 / 700

Complete all 30 questions then click Submit. Your MCQ score (25/25) will be shown. Short answers are marked separately.

MCQ Score
0 / 25
✏️ Your 5 short-answer responses are recorded for your lecturer.
Full total: MCQ + short-answer marks = / 30