Spaces:
Sleeping
Sleeping
fix escape
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ def greet(name):
|
|
| 14 |
def extract_texts(input_str):
|
| 15 |
pattern = r"msg='([^']*)'"
|
| 16 |
matches = re.findall(pattern, input_str)
|
| 17 |
-
return list(map(lambda x: ''.join(x.split('
|
| 18 |
|
| 19 |
|
| 20 |
async def summarize(input_text: str, input_url: str):
|
|
@@ -83,7 +83,7 @@ with gr.Blocks() as iface:
|
|
| 83 |
chat_btn = gr.Button("Chat")
|
| 84 |
with gr.Column():
|
| 85 |
output_text = gr.Textbox(label="回答")
|
| 86 |
-
|
| 87 |
# Event handler
|
| 88 |
chat_btn.click(fn=chat, inputs=[input_text, input_url], outputs=output_text)
|
| 89 |
|
|
|
|
| 14 |
def extract_texts(input_str):
|
| 15 |
pattern = r"msg='([^']*)'"
|
| 16 |
matches = re.findall(pattern, input_str)
|
| 17 |
+
return list(map(lambda x: ''.join(x.split('\\n')), matches))
|
| 18 |
|
| 19 |
|
| 20 |
async def summarize(input_text: str, input_url: str):
|
|
|
|
| 83 |
chat_btn = gr.Button("Chat")
|
| 84 |
with gr.Column():
|
| 85 |
output_text = gr.Textbox(label="回答")
|
| 86 |
+
|
| 87 |
# Event handler
|
| 88 |
chat_btn.click(fn=chat, inputs=[input_text, input_url], outputs=output_text)
|
| 89 |
|