Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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><
|
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")
|