Skip to content

Commit

Permalink
Working base for tensorflow without prediction of trained models
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaloney111 committed Apr 2, 2024
1 parent c43bbc0 commit 9be608f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions api/DataProcesser.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def pretrained_predict(self, df, model_name):
pipeline = pickle.load(model)

texts_to_predict = df['input_column']
texts_to_predict = [str(text) for text in texts_to_predict]
predictions = pipeline.predict(texts_to_predict)
df['output_column'] = predictions
return df
Expand Down
3 changes: 2 additions & 1 deletion api/Neural_Network2.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ def __init__(self, epochs):
self.epochs = epochs
self.epoch_num = 0


def on_epoch_begin(self, epoch, logs=None):
self.epoch_step = 0

def on_epoch_end(self, epoch, logs=None):
self.epoch_num += 1

def on_batch_end(self, batch, logs=None):
Expand Down
3 changes: 0 additions & 3 deletions api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@

import time
import os
import atexit
import threading
import pandas as pd
import nltk
import json
import asyncio
import logging
nltk.download('wordnet')


Expand Down
Binary file modified requirements.txt
Binary file not shown.

0 comments on commit 9be608f

Please sign in to comment.