microsoft / ML-For-Beginners

12 weeks, 26 lessons, 52 quizzes, classic Machine Learning for all
https://microsoft.github.io/ML-For-Beginners/
MIT License
69.7k stars 14.47k forks source link

Build Web App with Gradio #517

Closed AK391 closed 2 years ago

AK391 commented 2 years ago

Hi, for lesson https://github.com/microsoft/ML-For-Beginners/tree/main/3-Web-App

Is there any interest in adding Gradio as part of the lesson, Gradio is a fast way to demo machine learning models with a friendly web interface so that anyone can use it, anywhere and can be hosted for free on Huggingface Spaces

for example for a text generation model a few lines of code

import gradio as gr

description = "Story generation with GPT-2"
title = "Generate your own story"
examples = [["Adventurer is approached by a mysterious stranger in the tavern for a new quest."]]

interface = gr.Interface.load("huggingface/pranavpsv/gpt2-genre-story-generator",
            description=description,
            examples=examples
)

interface.launch()

will display this interface

story-gen

more info here: https://huggingface.co/blog/gradio-spaces

I can help with adding Gradio to the lesson, thanks

jlooper commented 2 years ago

Hi, this is a very interesting project, but it doesn't align with this particular curriculum's focus, which is classic ML. I appreciate your reaching out however.