Skip to content

Commit

Permalink
add and remove some logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Yinnii committed Apr 15, 2024
1 parent 11d527f commit d237e34
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,8 @@ public boolean llm_feedback(@PathParam("label1") String label1, @PathParam("labe
System.out.println("Block " + label1);
JSONObject error = new JSONObject();
JSONObject newText = new JSONObject();

String type = body.getType();
System.out.println("Filetype is: "+ type);
CodecRegistry pojoCodecRegistry = fromProviders(PojoCodecProvider.builder().automatic(true).build());
CodecRegistry codecRegistry = fromRegistries(MongoClientSettings.getDefaultCodecRegistry(), pojoCodecRegistry);
MongoClientSettings settings = MongoClientSettings.builder()
Expand All @@ -450,7 +451,6 @@ public void run() {
System.out.println("Upload text");

try {
System.out.println("Usertext is : " + userTexts);
// Store usertext with label
String wordspec = body.getWordSpec();
String fileName = createFileName(label1, body.getType());
Expand All @@ -464,11 +464,12 @@ public void run() {
ObjectId graphFileId = storeLocalFileRemote("comparison_" + label1 + "_vs_" + label2 + ".json",body.getTopic()+"-graph.json");

newText.put("userId", label1);

if (body.getType().toLowerCase().equals("application/pdf") || body.getType().toLowerCase().equals("pdf")) {

if (type.toLowerCase().equals("application/pdf") || type.toLowerCase().equals("pdf")) {
System.out.println("Get content from -cleaned.txt.");
newText.put("studentInput", readTxtFile("tmitocar/texts/" + label1 + "/"+ label1 + ".txt-cleaned.txt"));
} else {
newText.put("studentInput", body.getText());
newText.put("studentInput", userTexts.get(label1));
}

newText.put("taskNr", courseAndTask[1]);
Expand Down

0 comments on commit d237e34

Please sign in to comment.