Shami96 commited on
Commit
a6e31ac
·
verified ·
1 Parent(s): f992eb5

Update updated_word.py

Browse files
Files changed (1) hide show
  1. updated_word.py +9 -1
updated_word.py CHANGED
@@ -832,4 +832,12 @@ def process_hf(json_file, docx_file, output_file):
832
  import traceback
833
  traceback.print_exc()
834
 
835
- main(json_path, docx_path, output_path)
 
 
 
 
 
 
 
 
 
832
  import traceback
833
  traceback.print_exc()
834
 
835
+ if __name__ == "__main__":
836
+ import sys
837
+ if len(sys.argv) != 4:
838
+ print("Usage: python updated_word.py <input_docx> <updated_json> <output_docx>")
839
+ exit(1)
840
+ docx_path = sys.argv[1]
841
+ json_path = sys.argv[2]
842
+ output_path = sys.argv[3]
843
+ process_hf(json_path, docx_path, output_path) # <--- if your main function is called process_hf!