cspocketindia commited on
Commit
8d061f9
1 Parent(s): 38d0036

Optimized codebase

Browse files
gradio_app.py CHANGED
@@ -37,10 +37,7 @@ def log_record(vals):
37
  writer.writerow(utils.sanitize_list_for_csv(headers))
38
  writer.writerow(utils.sanitize_list_for_csv(vals))
39
  schedule.run_pending()
40
- print(f"Last Sync: {job.last_run}")
41
-
42
- # with open(log_file, "r", encoding="utf-8") as csvfile:
43
- # line_count = len([None for _ in csv.reader(csvfile)]) - 1
44
 
45
  def predict(sentence):
46
 
 
37
  writer.writerow(utils.sanitize_list_for_csv(headers))
38
  writer.writerow(utils.sanitize_list_for_csv(vals))
39
  schedule.run_pending()
40
+ print(f"Last Sync: {job.last_run}")
 
 
 
41
 
42
  def predict(sentence):
43
 
src/data_loader/go_emotions.py DELETED
@@ -1,19 +0,0 @@
1
- import os
2
- import torch
3
- import pickle
4
- import numpy as np
5
- from PIL import Image, ImageDraw, ImageFont
6
- from ..utils.utilities import Utility
7
-
8
-
9
- class GoEmotionsDataset(torch.utils.data.Dataset):
10
- util = Utility()
11
- def __init__(self, embeddings, labels):
12
- self.labels = labels
13
- self.instances = embeddings
14
-
15
- def __len__(self):
16
- return self.instances.shape[0]
17
-
18
- def __getitem__(self, idx):
19
- return self.instances[idx], self.labels[idx]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/models/__pycache__/bert.cpython-39.pyc DELETED
Binary file (5.74 kB)
 
src/utils/__pycache__/utilities.cpython-39.pyc DELETED
Binary file (689 Bytes)
 
src/views/index.html DELETED
@@ -1,10 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <body>
4
- <h1>Sentiment Prediction</h1>
5
- <form action = "/predict" method = "POST">
6
- <input type = "text" name = "text" /></p>
7
- <p><input type = "submit" value = "PREDICT" /></p>
8
- </form>
9
- </body>
10
- </html>