molokhovdmitry commited on
Commit
a3a6f78
·
1 Parent(s): 430c241

Add model and src folders

Browse files
README.md CHANGED
@@ -5,7 +5,7 @@ colorFrom: purple
5
  colorTo: green
6
  sdk: streamlit
7
  sdk_version: 1.29.0
8
- app_file: main.py
9
  pinned: false
10
  ---
11
 
 
5
  colorTo: green
6
  sdk: streamlit
7
  sdk_version: 1.29.0
8
+ app_file: src/main.py
9
  pinned: false
10
  ---
11
 
cat.csv → model/cat.csv RENAMED
File without changes
pickle_model.pkl → model/pickle_model.pkl RENAMED
File without changes
main.py → src/main.py RENAMED
@@ -14,7 +14,7 @@ def load_recognition_model():
14
  """
15
  Loads the translation model pipeline.
16
  """
17
- filename = "pickle_model.pkl"
18
  with open(filename, 'rb') as file:
19
  model = pickle.load(file)
20
  return model
 
14
  """
15
  Loads the translation model pipeline.
16
  """
17
+ filename = "model/pickle_model.pkl"
18
  with open(filename, 'rb') as file:
19
  model = pickle.load(file)
20
  return model
mapbox_map.py → src/mapbox_map.py RENAMED
File without changes
model_execute.py → src/model_execute.py RENAMED
@@ -22,7 +22,7 @@ def output_to_names(output):
22
  """
23
  Converts model outputs to category names names.
24
  """
25
- with open('cat.csv') as file:
26
  reader = csv.reader(file)
27
  cat_list = list(reader)[0]
28
 
@@ -58,7 +58,7 @@ def check_photo(name, photo):
58
 
59
 
60
  if __name__ == "__main__":
61
- pkl_filename = "pickle_model.pkl"
62
  with open(pkl_filename, 'rb') as file:
63
  model = pickle.load(file)
64
 
 
22
  """
23
  Converts model outputs to category names names.
24
  """
25
+ with open('model/cat.csv') as file:
26
  reader = csv.reader(file)
27
  cat_list = list(reader)[0]
28
 
 
58
 
59
 
60
  if __name__ == "__main__":
61
+ pkl_filename = "model/pickle_model.pkl"
62
  with open(pkl_filename, 'rb') as file:
63
  model = pickle.load(file)
64
 
model_retrain.py → src/model_retrain.py RENAMED
@@ -173,7 +173,7 @@ model, optimizer, train_loader, valid_loader, 30)
173
  print('acc_train:', acc_train, '\nacc_valid:', acc_valid)
174
 
175
  # Сохранение модели в текущую рабочую директорию
176
- pkl_filename = "pickle_model.pkl"
177
  with open(pkl_filename, 'wb') as file:
178
  pickle.dump(model, file)
179
 
 
173
  print('acc_train:', acc_train, '\nacc_valid:', acc_valid)
174
 
175
  # Сохранение модели в текущую рабочую директорию
176
+ pkl_filename = "model/pickle_model.pkl"
177
  with open(pkl_filename, 'wb') as file:
178
  pickle.dump(model, file)
179
 
{picturedownloader → src/picturedownloader}/exampleThumb.py RENAMED
File without changes
{picturedownloader → src/picturedownloader}/main.py RENAMED
File without changes
summarization.py → src/summarization.py RENAMED
File without changes
wikipedia_api.py → src/wikipedia_api.py RENAMED
File without changes