finalizare 1.0

This commit is contained in:
andrei-mihnea-cerbu
2024-05-21 12:10:53 +03:00
parent f7795f7519
commit 1cc1d34003
11268 changed files with 2102399 additions and 10909 deletions
@@ -46,7 +46,6 @@ class DiseasePredictor:
self.model.fit(self.X_train, self.y_train) # X_train is a DataFrame with feature names
logging.info(f"Training accuracy: {self.model.score(self.X_test, self.y_test):.2f}")
def extract_features(self, text):
logging.info("Extracting features from text")
@@ -118,7 +117,7 @@ class DiseasePredictor:
if count == 3:
break
# Return the JSON object
return json.dumps(json_output, indent=4)
return json.dumps(json_output)
# Example usage:
@@ -127,11 +126,11 @@ if __name__ == "__main__":
if len(sys.argv) != 2:
logging.error("Incorrect number of arguments provided.")
json_output = {
"StatusCode": 400,
"Message": "Incorrect number of arguments provided.",
"Data": []
}
print(json.dumps(json_output, indent=4))
"StatusCode": 400,
"Message": "Incorrect number of arguments provided.",
"Data": []
}
print(json.dumps(json_output))
sys.exit(1)
logging.basicConfig(filename='disease_prediction.log', level=logging.INFO,