ysharma HF staff commited on
Commit
d87c30e
1 Parent(s): 94473bd
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -91,8 +91,8 @@ def text_generate(prompt, generated_txt): #, input_prompt_sql ): #, input_prompt
91
  if len(new_prompt) == 0:
92
  temp_text = display_output[::-1]
93
  print(f"What is the last character of sentence? : {temp_text[0]}")
94
- if temp_text[0] == '.':
95
- first_period_loc = temp_text[1:].find('.')
96
  print(f"Location of last Period is: {first_period_loc}")
97
  new_prompt = display_output[-first_period_loc:]
98
  print(f"Not sending blank as prompt so new prompt for next cycle is : {new_prompt}")
 
91
  if len(new_prompt) == 0:
92
  temp_text = display_output[::-1]
93
  print(f"What is the last character of sentence? : {temp_text[0]}")
94
+ if temp_text[1] == '.':
95
+ first_period_loc = temp_text[2:].find('.')
96
  print(f"Location of last Period is: {first_period_loc}")
97
  new_prompt = display_output[-first_period_loc:]
98
  print(f"Not sending blank as prompt so new prompt for next cycle is : {new_prompt}")