Detsutut commited on
Commit
6423075
1 Parent(s): c9fb83a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -27,8 +27,8 @@ def generate_text(input_text, max_new_tokens, temperature, top_p, split_output):
27
  if split_output:
28
  sentences = re.split('(?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|\?)\s', generated_text)
29
  if sentences:
30
- generated_text = sentences[0] + '.'
31
- return f"<span{input_text}</span><span style='color: blue;'>{generated_text}</span>"
32
 
33
  # Create the Gradio interface
34
  input_text = gr.Textbox(lines=2, placeholder="Enter your text here...", label="Input Text")
 
27
  if split_output:
28
  sentences = re.split('(?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|\?)\s', generated_text)
29
  if sentences:
30
+ generated_text = sentences[0]
31
+ return f"<span>{input_text}</span><b style='color: blue;'>{generated_text}</b>"
32
 
33
  # Create the Gradio interface
34
  input_text = gr.Textbox(lines=2, placeholder="Enter your text here...", label="Input Text")