Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -44,8 +44,11 @@ def convert_html(html_input, output_format):
|
|
44 |
"""
|
45 |
Use the JinaAI ReaderLM-v2 pipeline to convert HTML into Markdown or JSON.
|
46 |
"""
|
|
|
|
|
|
|
47 |
prompt = f"Convert the following HTML into {output_format}:\n\n{html_input}"
|
48 |
-
response = html_converter(prompt, max_length=
|
49 |
converted_output = response[0]['generated_text']
|
50 |
|
51 |
# Remove the prompt from the start of the generated text, if present
|
@@ -176,7 +179,7 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as demo:
|
|
176 |
|
177 |
convert_btn_2 = gr.Button("Convert")
|
178 |
converted_output_2 = gr.Textbox(
|
179 |
-
lines=
|
180 |
label="Converted Output"
|
181 |
)
|
182 |
|
|
|
44 |
"""
|
45 |
Use the JinaAI ReaderLM-v2 pipeline to convert HTML into Markdown or JSON.
|
46 |
"""
|
47 |
+
|
48 |
+
# ReaderLM-2 System Prompt
|
49 |
+
|
50 |
prompt = f"Convert the following HTML into {output_format}:\n\n{html_input}"
|
51 |
+
response = html_converter(prompt, max_length=9999, num_return_sequences=1)
|
52 |
converted_output = response[0]['generated_text']
|
53 |
|
54 |
# Remove the prompt from the start of the generated text, if present
|
|
|
179 |
|
180 |
convert_btn_2 = gr.Button("Convert")
|
181 |
converted_output_2 = gr.Textbox(
|
182 |
+
lines=20,
|
183 |
label="Converted Output"
|
184 |
)
|
185 |
|