freddyaboulton HF staff commited on
Commit
1584f2a
Β·
1 Parent(s): ac0496e
Files changed (1) hide show
  1. README.md +26 -89
README.md CHANGED
@@ -7,38 +7,44 @@ sdk: static
7
  pinned: false
8
  ---
9
 
10
- <div class="grid lg:grid-cols-2 gap-x-4">
11
- <h1 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">EuroScipy 2022</h1>
12
- <p class="lg:col-span-2">EuroSciPy 2022 You're invited!</p>
13
- <p class="lg:col-span-2">
14
- Welcome to the 14th European Conference on Python in Science. The EuroSciPy meeting is a cross-disciplinary gathering focused on the use and development of the Python language in scientific research.This event strives to bring together both users and developers of scientific tools, as well as academic research and state of the art industry.</p>
15
-
16
  <h2 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">Hugging Face Gradio Hackathon πŸ€— </h2>
17
  <p class="lg:col-span-2">
18
- Come Join us from August 29th to September 2th for a Hackathon in person and online using Gradio and Hugging Face to build and host Machine Learning and data science demos. Find tutorial on getting started with Gradio on Hugging Face <a href="https://huggingface.co/course/chapter9/1?fw=pt" style="text-decoration: underline" target="_blank">here</a> and to get started with the new Gradio Blocks API <a href="https://gradio.app/introduction_to_blocks/" style="text-decoration: underline" target="_blank">here</a>. Once the gradio demo is setup, see how to add it to Hugging Face Spaces <a href="https://huggingface.co/docs/hub/spaces-sdks-gradio" style="text-decoration: underline" target="_blank">here</a>.</p>
19
 
20
- <h3 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">Sprint September 2nd</h3>
21
- <ul class="lg:col-span-2" style="list-style: circle inside;padding-left: 40px;">
22
- <li class="my-4">Number of people: 3 maintainers (virtual) + anyone willing to join
23
  </li>
24
- <li class="my-4">Build Machine Learning/Data Science demos. You can also join if you don't know much about ML/Data Science!</li>
25
- <li class="my-4">Python Level: any</li>
26
- </ul>
 
27
 
28
- <h3 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">Join organization by clicking <a href="https://huggingface.co/organizations/EuroSciPy2022/share/PmvksSSiuLLAZzCoCVVtbOVWQUfsFRvgsi" style="text-decoration: underline" target="_blank">here</a></h3>
 
 
 
 
 
 
 
 
 
 
 
29
 
30
- <img class="lg:col-span-2" src="https://i.imgur.com/tdDEx9C.png" alt="EuroSciPy Banner" style="margin:10px">
31
 
32
- <h3 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">Potential ideas for creating spaces: </h3>
33
  <ul class="lg:col-span-2" style="list-style: circle inside;padding-left: 40px;">
34
- <li class="my-4">Check out the spaces hosted in this organization for timeseries-forecasting-with-prophet and xgboost-income-prediction-with-explainability</li>
35
- <li class="my-4">Trending papers from <a href="https://paperswithcode.com/" style="text-decoration: underline">https://paperswithcode.com/</a></li>
36
- <li class="my-4">Models from huggingface model hub: <a href="https://huggingface.co/models" style="text-decoration: underline">https://huggingface.co/models</a></li>
37
  <li class="my-4">Papers from NAACL 2022 event <a href="https://huggingface.co/NAACL2022" style="text-decoration: underline">https://huggingface.co/NAACL2022</a></li>
38
  <li class="my-4">Papers from ICML 2022 event <a href="https://huggingface.co/ICML2022" style="text-decoration: underline">https://huggingface.co/ICML2022</a></li>
39
  <li class="my-4">Hugging Face course event ideas <a href="https://discuss.huggingface.co/c/course/course-event/25" style="text-decoration: underline">https://discuss.huggingface.co/c/course/course-event/25</a></li>
40
  <li class="my-4">Models from other model hubs
41
  <ul class="lg:col-span-2" style="list-style: circle inside;padding-left: 40px;">
 
42
  <li class="my-4">Tensorflow Hub: see example Gradio demos at <a href="https://huggingface.co/tensorflow" style="text-decoration: underline">https://huggingface.co/tensorflow</a></li>
43
  <li class="my-4">Pytorch Hub: see example Gradio demos at <a href="https://huggingface.co/pytorch" style="text-decoration: underline">https://huggingface.co/pytorch</a></li>
44
  <li class="my-4">ONNX model Hub: see example Gradio demos at <a href="https://huggingface.co/onnx" style="text-decoration: underline">https://huggingface.co/onnx</a></li>
@@ -59,73 +65,4 @@ Come Join us from August 29th to September 2th for a Hackathon in person and onl
59
  <h3 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">LeaderBoard for Most Popular EuroSciPy Spaces</h3>
60
  <p class="lg:col-span-2">See the <a href="https://huggingface.co/spaces/EuroSciPy2022/Leaderboard" target="_blank" style="text-decoration:underline; font-weight:bold">EuroSciPy Leaderboard</a></p>
61
  <h4 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">Huging Face Spaces & Gadio for Showcasing your EuroSciPy β€˜22 Demo
62
- </h4>
63
- <p class="lg:col-span-2">
64
- In this tutorial, we will demonstrate how to showcase your demo with an easy to use web interface using the Gradio Python library and host it on Hugging Face Spaces so that conference attendees can easily find and try out your demos. Also, see <a href="https://gradio.app/introduction_to_blocks/" style="text-decoration: underline" target="_blank">https://gradio.app/introduction_to_blocks/</a>, for a more flexible way to build Gradio Demos
65
- </p>
66
- <h3 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">πŸš€ Create a Gradio Demo from your Model
67
- </h3>
68
- <p class="lg:col-span-2">
69
- The first step is to create a web demo from your model. As an example, we will be creating a demo from an image classification model (called model) which we will be uploading to Spaces. The full code for steps 1-4 can be found in this <a href="https://colab.research.google.com/drive/1S6seNoJuU7_-hBX5KbXQV4Fb_bbqdPBk?usp=sharing" style="text-decoration: underline" target="_blank">colab notebook</a>.
70
- </p><br />
71
-
72
- <h3 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">1. Install the gradio library
73
- </h3>
74
- <p class="lg:col-span-2">
75
- All you need to do is to run this in the terminal: <code>pip install gradio</code>
76
- </p>
77
- <br />
78
- <h3 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">2. Define a function in your Python code that performs inference with your model on a data point and returns the prediction
79
- </h3>
80
- <p class="lg:col-span-2">
81
- Here’s we define our image classification model prediction function in PyTorch (any framework, like TensorFlow, scikit-learn, JAX, or a plain Python will work as well):
82
- <pre>
83
- <code>
84
- def predict(inp):
85
-
86
- inp = Image.fromarray(inp.astype('uint8'), 'RGB')
87
-
88
- inp = transforms.ToTensor()(inp).unsqueeze(0)
89
-
90
- with torch.no_grad():
91
-
92
- prediction = torch.nn.functional.softmax(model(inp)[0], dim=0)
93
-
94
- return {labels[i]: float(prediction[i]) for i in range(1000)}
95
- </code>
96
- </pre>
97
- </p>
98
-
99
- <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
100
- </h3>
101
- <p class="lg:col-span-2">
102
- For the image classification model from Step 2, it would like like this:
103
- </p>
104
- <pre>
105
- <code>
106
- inputs = gr.inputs.Image()
107
-
108
- outputs = gr.outputs.Label(num_top_classes=3)
109
-
110
- io = gr.Interface(fn=predict, inputs=inputs, outputs=outputs)
111
- </code>
112
- </pre>
113
- <p class="lg:col-span-2">
114
- If you need help creating a Gradio Interface for your model, check out the Gradio Getting Started guide.
115
- </p>
116
-
117
- <h3 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">4. Then launch() you Interface to confirm that it runs correctly locally (or wherever you are running Python)
118
- </h3>
119
- <pre>
120
- <code>
121
- io.launch()
122
- </code>
123
- </pre>
124
- <p class="lg:col-span-2">
125
- You should see a web interface like the following where you can drag and drop your data points and see the predictions:
126
- </p>
127
- <img class="lg:col-span-2" src="https://i.imgur.com/1hsIgJJ.png" alt="Gradio Interface" style="margin:10px">
128
- </div>
129
-
130
-
131
-
 
7
  pinned: false
8
  ---
9
 
 
 
 
 
 
 
10
  <h2 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">Hugging Face Gradio Hackathon πŸ€— </h2>
11
  <p class="lg:col-span-2">
12
+ Come Join us from August 29th to September 2th for a Hackathon in person and online using Gradio and Hugging Face to build and host Machine Learning and data science demos.
13
 
14
+ <h3 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">Key Details</h3>
15
+ <ul class="lg:col-span-2" style="list-style: circle inside;padding-left: 40px;">
16
+ <li class="my-4"><b>Who's invited:</b> Anyone willing to join
17
  </li>
18
+ <li class="my-4"><b>Goal:</b>Build Machine Learning/Data Science demos. Demo with most votes gets a prize 🎁 (see below). You can also join if you don't know much about ML/Data Science!</li>
19
+ <li class="my-4"><b>Python Level:</b> Any</li>
20
+ <li class="my-4"> Join the EuroSciPy2022 organization on HuggingFace by clicking <a href="https://huggingface.co/organizations/EuroSciPy2022/share/PmvksSSiuLLAZzCoCVVtbOVWQUfsFRvgsi" style="text-decoration: underline" target="_blank">here</a> </li>
21
+ </ul>
22
 
23
+ <h3 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">Getting Started</h3>
24
+ <ul class="lg:col-span-2" style="list-style: circle inside;padding-left: 40px;">
25
+ <li class="my-4">If you have never used Gradio before, the Gradio <a href="https://huggingface.co/course/chapter9/1?fw=pt" style="text-decoration: underline" target="_blank">course</a> will explain the fundamentals.
26
+ </li>
27
+ <li class="my-4">The Gradio quickstart <a href="https://gradio.app/getting_started/" style="text-decoration: underline" target="_blank">page</a> is a good place to start as well.
28
+ </li>
29
+ <li class="my-4">The Gradio docs are <a href="https://gradio.app/docs/" style="text-decoration: underline" target="_blank">here</a>.
30
+ </li>
31
+ <li class="my-4">This <a href="https://huggingface.co/docs/hub/spaces-sdks-gradio" style="text-decoration: underline" target="_blank">guide</a> covers how to host Gradio apps on HuggingFace spaces..
32
+ </li>
33
+ <li class="my-4"> Join the EuroSciPy2022 organization on HuggingFace by clicking <a href="https://huggingface.co/organizations/EuroSciPy2022/share/PmvksSSiuLLAZzCoCVVtbOVWQUfsFRvgsi" style="text-decoration: underline" target="_blank">here</a> </li>
34
+ </ul>
35
 
 
36
 
37
+ <h3 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">Hackathon Ideas: </h3>
38
  <ul class="lg:col-span-2" style="list-style: circle inside;padding-left: 40px;">
39
+ <li class="my-4">Any machine learning model or concept is a good candidate for a demo. Check out the spaces hosted in this organization for <a href="https://huggingface.co/spaces/EuroSciPy2022/timeseries-forecasting-with-prophet" style="text-decoration: underline" target="_blank">time series forecasting</a> <a href="https://huggingface.co/spaces/EuroSciPy2022/xgboost-income-prediction-with-explainability" style="text-decoration: underline" target="_blank">income classification with explainability</a> </li>
40
+ <li class="my-4">Implement a demo for a trending paper from <a href="https://paperswithcode.com/" style="text-decoration: underline">https://paperswithcode.com/</a></li>
41
+ <li class="my-4">Models from huggingface model hub: <a href="https://huggingface.co/models" style="text-decoration: underline">https://huggingface.co/models</a> In particular, the <a href="https://huggingface.co/models?pipeline_tag=tabular-classification" style="text-decoration: underline">tabular classification</a> and <a href="https://huggingface.co/models?pipeline_tag=tabular-regression" style="text-decoration: underline">tabular regression</a> models may be of interest.</li>
42
  <li class="my-4">Papers from NAACL 2022 event <a href="https://huggingface.co/NAACL2022" style="text-decoration: underline">https://huggingface.co/NAACL2022</a></li>
43
  <li class="my-4">Papers from ICML 2022 event <a href="https://huggingface.co/ICML2022" style="text-decoration: underline">https://huggingface.co/ICML2022</a></li>
44
  <li class="my-4">Hugging Face course event ideas <a href="https://discuss.huggingface.co/c/course/course-event/25" style="text-decoration: underline">https://discuss.huggingface.co/c/course/course-event/25</a></li>
45
  <li class="my-4">Models from other model hubs
46
  <ul class="lg:col-span-2" style="list-style: circle inside;padding-left: 40px;">
47
+ <li class="my-4">See example scikit-learn Demos at <a href="https://huggingface.co/scikit-learn" style="text-decoration: underline">https://huggingface.co/scikit-learn</a></li>
48
  <li class="my-4">Tensorflow Hub: see example Gradio demos at <a href="https://huggingface.co/tensorflow" style="text-decoration: underline">https://huggingface.co/tensorflow</a></li>
49
  <li class="my-4">Pytorch Hub: see example Gradio demos at <a href="https://huggingface.co/pytorch" style="text-decoration: underline">https://huggingface.co/pytorch</a></li>
50
  <li class="my-4">ONNX model Hub: see example Gradio demos at <a href="https://huggingface.co/onnx" style="text-decoration: underline">https://huggingface.co/onnx</a></li>
 
65
  <h3 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">LeaderBoard for Most Popular EuroSciPy Spaces</h3>
66
  <p class="lg:col-span-2">See the <a href="https://huggingface.co/spaces/EuroSciPy2022/Leaderboard" target="_blank" style="text-decoration:underline; font-weight:bold">EuroSciPy Leaderboard</a></p>
67
  <h4 class="my-8 lg:col-span-2" style="font-size:20px; font-weight:bold">Huging Face Spaces & Gadio for Showcasing your EuroSciPy β€˜22 Demo
68
+ </h4>