Skip to content

Commit

Permalink
flush stdout to make redirect work
Browse files Browse the repository at this point in the history
  • Loading branch information
guillefix committed Jun 5, 2021
1 parent 0f1df69 commit f34cc84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ new_inventory_index.txt
thumbnails/*
image_embeddings_clip.npy
sentence_embeddings_clip.npy
log.txt
2 changes: 2 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import re
import json
from collections import Counter
import sys

# import json
# records = json.loads(open("InventoryScrap.txt","r",encoding="utf-8").read())
Expand Down Expand Up @@ -220,6 +221,7 @@ def do_GET(self):

# i = np.random.choice(results)

sys.stdout.flush()
self.wfile.write(bytes(str(results_str), "utf-8"))

def do_HEAD(self):
Expand Down

0 comments on commit f34cc84

Please sign in to comment.