MateuszLis commited on
Commit
2981ea0
·
verified ·
1 Parent(s): 6a504e8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +43 -3
README.md CHANGED
@@ -1,3 +1,43 @@
1
- ---
2
- license: cc-by-nc-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-2.0
3
+ ---
4
+
5
+ # 🍝 RistoNet
6
+
7
+ **RistoNet** is your AI foodie companion! Based on **EfficientNet**, this model recognizes gourmet dishes from photos with **~91% accuracy**. Perfect for recipe apps, food blogs, or just flexing your culinary AI skills. 😎🍕
8
+
9
+ ---
10
+
11
+ ## 🚀 Features
12
+ - Recognizes a wide variety of gourmet dishes
13
+ - Lightweight and fast thanks to EfficientNet
14
+ - Easy Hugging Face integration
15
+ - Ready for research, apps, or just fun experiments
16
+
17
+ ---
18
+
19
+ ## 🖼️ Quick Usage
20
+
21
+ ```python
22
+ from transformers import AutoFeatureExtractor, AutoModelForImageClassification
23
+ from PIL import Image
24
+ import torch
25
+
26
+ # Load model & feature extractor
27
+ extractor = AutoFeatureExtractor.from_pretrained("your-username/RistoNet")
28
+ model = AutoModelForImageClassification.from_pretrained("your-username/RistoNet")
29
+
30
+ # Load an image
31
+ image = Image.open("my_dish.jpg")
32
+
33
+ # Preprocess
34
+ inputs = extractor(images=image, return_tensors="pt")
35
+
36
+ # Predict
37
+ with torch.no_grad():
38
+ outputs = model(**inputs)
39
+ predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
40
+
41
+ # Top class
42
+ predicted_class = predictions.argmax().item()
43
+ print(f"Predicted class: {predicted_class}")