m-vai commited on
Commit
68cef6f
1 Parent(s): 3984963

adjust print statements

Browse files
Files changed (1) hide show
  1. tester.py +9 -9
tester.py CHANGED
@@ -26,7 +26,7 @@ Following Sugarman’s death, the Embassy of the United States issued a statemen
26
  return s
27
 
28
  def mainSimple():
29
- print("In main simple...")
30
  # print(pathlib.Path().resolve())
31
  # generate_text_pipline = pipeline(model="databricks/dolly-v2-3b", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")
32
  # generate_text_pipline = pipeline(model="verseAI/databricks-dolly-v2-3b", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")
@@ -36,10 +36,10 @@ def mainSimple():
36
  resp = generate_text_pipline(inputText)
37
  respStr = resp[0]["generated_text"]
38
 
39
- print(f'Input: {inputText}')
40
- print(f'Response: {respStr}')
41
 
42
- print("All Done!")
43
 
44
  def getInstrAndContext():
45
  context = '''George Washington (February 22, 1732[b] - December 14, 1799) was an American military officer, statesman,
@@ -50,7 +50,7 @@ and Founding Father who served as the first president of the United States from
50
  return instr, context
51
 
52
  def mainContext():
53
- print("In main context...")
54
  workingDir = pathlib.Path().resolve()
55
  generate_text_pipline = pipeline(model=workingDir, torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto", return_full_text=True)
56
 
@@ -77,11 +77,11 @@ def mainContext():
77
  else:
78
  resp = llm_chain.predict(instruction=instr).lstrip()
79
 
80
- print(f'Input-Instr: {instr}')
81
- print(f'Input-Context: {context}')
82
- print(f'Response: {resp}')
83
 
84
- print("All Done!")
85
 
86
  if __name__ == "__main__":
87
  mainContext()
 
26
  return s
27
 
28
  def mainSimple():
29
+ print("\nIn main simple...")
30
  # print(pathlib.Path().resolve())
31
  # generate_text_pipline = pipeline(model="databricks/dolly-v2-3b", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")
32
  # generate_text_pipline = pipeline(model="verseAI/databricks-dolly-v2-3b", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")
 
36
  resp = generate_text_pipline(inputText)
37
  respStr = resp[0]["generated_text"]
38
 
39
+ print(f'\nInput: {inputText}')
40
+ print(f'\nResponse: {respStr}')
41
 
42
+ print("\nAll Done!\n")
43
 
44
  def getInstrAndContext():
45
  context = '''George Washington (February 22, 1732[b] - December 14, 1799) was an American military officer, statesman,
 
50
  return instr, context
51
 
52
  def mainContext():
53
+ print("\nIn main context...")
54
  workingDir = pathlib.Path().resolve()
55
  generate_text_pipline = pipeline(model=workingDir, torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto", return_full_text=True)
56
 
 
77
  else:
78
  resp = llm_chain.predict(instruction=instr).lstrip()
79
 
80
+ print(f'\nInput-Context: {context}')
81
+ print(f'\nInput-Instr: {instr}')
82
+ print(f'\nResponse: {resp}')
83
 
84
+ print("\nAll Done!\n")
85
 
86
  if __name__ == "__main__":
87
  mainContext()