tarikkaankoc7 commited on
Commit
d385d83
·
1 Parent(s): d983808

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +57 -1
README.md CHANGED
@@ -6,7 +6,19 @@ library_name: transformers
6
  pipeline_tag: text-classification
7
  ---
8
 
9
- # 📊 Model Performance
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  In this document, you can find detailed insights regarding our classification model's performance.
12
 
@@ -31,3 +43,47 @@ In this document, you can find detailed insights regarding our classification mo
31
  | Yemek İhtiyacı | 0.90 | 0.88 | 0.89 | 226 |
32
  | **Total/Avg** | **0.89** | **0.89**| **0.89** | **1485**|
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  pipeline_tag: text-classification
7
  ---
8
 
9
+ # Akbank Hackathon: DisasterTech - Our Contribution
10
+
11
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/62bdd8065f304e8ea762287f/raHCZDUuHPckwwrKDRz-A.png)
12
+
13
+ ## 🎯 Introduction
14
+
15
+ **Akbank LAB** and **imece** teamed up to launch the **Akbank Hackathon: DisasterTech**, a beacon for innovators passionate about harnessing technology to revolutionize disaster management and relief. The event, which began on the 14th of October online and culminated at the Sabancı Center on the 22nd, saw a plethora of teams brainstorming and developing visionary solutions aimed at disaster alerts, preparedness, and post-calamity assistance.
16
+
17
+ In response to this call-to-action, our team stepped up, and this repository stands testament to the innovation we brought to the table during this monumental event.
18
+
19
+ For an in-depth look at the hackathon, feel free to visit [Akbank Hackathon: DisasterTech](https://www.akbanklab.com/tr/akbank-hackathon-disastertech#section-4).
20
+
21
+ ## 📊 Model Performance & Usage
22
 
23
  In this document, you can find detailed insights regarding our classification model's performance.
24
 
 
43
  | Yemek İhtiyacı | 0.90 | 0.88 | 0.89 | 226 |
44
  | **Total/Avg** | **0.89** | **0.89**| **0.89** | **1485**|
45
 
46
+
47
+ ## 🖥️ How to use the model
48
+
49
+ Here is a Python example demonstrating how to use the model for predicting class of a given text:
50
+
51
+ ```python
52
+ from transformers import BertTokenizer, BertForSequenceClassification
53
+ from torch.nn.functional import softmax
54
+ import torch
55
+
56
+ model_name = "tarikkaankoc7/zeltech-akbank-hackathon"
57
+ model = BertForSequenceClassification.from_pretrained(model_name)
58
+ tokenizer = BertTokenizer.from_pretrained(model_name)
59
+ model.eval()
60
+
61
+ def predict(text):
62
+ inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=512)
63
+
64
+ with torch.no_grad():
65
+ outputs = model(**inputs)
66
+
67
+ probs = softmax(outputs.logits, dim=-1)
68
+ predicted_class_id = torch.argmax(probs, dim=-1).item()
69
+ predicted_class_name = model.config.id2label[predicted_class_id]
70
+
71
+ return predicted_class_name
72
+
73
+ text = "Hatay/Antakya odabaşı atatürk bulvarı ahmet gürses apartmanı arkadasım ilayda kürkçü enkaz altında paylaşır mısınız"
74
+ predicted_class_name = predict(text)
75
+ print(f"Predicted Class: {predicted_class_name}")
76
+ ```
77
+
78
+ ## Expected Output:
79
+
80
+ ```bash
81
+ Predicted Class: Debris Removal Notification
82
+ ```
83
+
84
+ ## 🖋️ Authors
85
+
86
+ - **Şeyma SARIGIL** - [📧 Email](mailto:seymasargil@gmail.com)
87
+ - **Tarık Kaan KOÇ** - [📧 Email](mailto:tarikkaan1koc@gmail.com)
88
+ - **Alaaddin Erdinç DAL** - [📧 Email](mailto:aerdincdal@icloud.com)
89
+ - **Anıl YAĞIZ** - [📧 Email](mailto:anill.yagiz@gmail.com)