ysharma HF staff commited on
Commit
5e7882a
1 Parent(s): 0895195
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -57,9 +57,10 @@ def whisper_stt(audio):
57
  # LLM - Bloom Response
58
  def lang_model_response(prompt):
59
  print(f"*****Inside lang_model_response - Prompt is :{prompt}")
60
- p = """If the following text is a question reply with an answer, else complete the sentence.
61
- this is the text: """
62
- prompt = p + prompt #+ "\n" #+ "Response: "
 
63
  #prompt = prompt + "\n"
64
 
65
  if len(prompt) == 0:
@@ -89,7 +90,7 @@ def lang_model_response(prompt):
89
  #elif '.' in prompt:
90
  # solution = output_tmp.split(".")[1]
91
  #else:
92
- solution = output_tmp.split("\n")[1]
93
 
94
  print(f"Final response after splits is: {solution}")
95
  return solution
 
57
  # LLM - Bloom Response
58
  def lang_model_response(prompt):
59
  print(f"*****Inside lang_model_response - Prompt is :{prompt}")
60
+ p = """Question: How are you doing today?
61
+ Answer: I am doing good, thanks.
62
+ Question: """
63
+ prompt = p + prompt + "\n" + "Answer: "
64
  #prompt = prompt + "\n"
65
 
66
  if len(prompt) == 0:
 
90
  #elif '.' in prompt:
91
  # solution = output_tmp.split(".")[1]
92
  #else:
93
+ solution = output_tmp.split("Answer:")[2]
94
 
95
  print(f"Final response after splits is: {solution}")
96
  return solution