ysharma HF staff commited on
Commit
a801021
1 Parent(s): 34c2304
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -83,7 +83,13 @@ def lang_model_response(prompt):
83
  print(f"output is : {output}")
84
  output_tmp = output[0]['generated_text']
85
  print(f"output_tmp is: {output_tmp}")
86
- solution = output_tmp.split("\n")[2]
 
 
 
 
 
 
87
  print(f"Final response after splits is: {solution}")
88
  return solution
89
 
 
83
  print(f"output is : {output}")
84
  output_tmp = output[0]['generated_text']
85
  print(f"output_tmp is: {output_tmp}")
86
+ if '?' in prompt:
87
+ solution = output_tmp.split("?")[1]
88
+ elif '.' in prompt:
89
+ solution = output_tmp.split(".")[1]
90
+ else:
91
+ solution = output_tmp.split("\n")[1]
92
+
93
  print(f"Final response after splits is: {solution}")
94
  return solution
95