markdwon
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ from datasets import load_dataset, Dataset, DatasetDict
|
|
5 |
from huggingface_hub import HfApi, login
|
6 |
import os
|
7 |
from datetime import datetime
|
|
|
8 |
|
9 |
hf_api = HfApi()
|
10 |
HF_TOKEN = os.getenv('HF_TOKEN')
|
@@ -43,7 +44,7 @@ def format_response_1_html(response):
|
|
43 |
<div style="border: 1px solid white; background-color: black;
|
44 |
padding: 10px; margin: 5px;">
|
45 |
<strong style="color: white;">Answer 1:</strong>
|
46 |
-
<div style="color: white;">{response}</div>
|
47 |
</div>
|
48 |
'''
|
49 |
def format_response_2_html(response):
|
@@ -51,7 +52,7 @@ def format_response_2_html(response):
|
|
51 |
<div style="border: 1px solid white; background-color: black;
|
52 |
padding: 10px; margin: 5px;">
|
53 |
<strong style="color: white;">Answer 2:</strong>
|
54 |
-
<div style="color: white;">{response}</div>
|
55 |
</div>
|
56 |
'''
|
57 |
|
|
|
5 |
from huggingface_hub import HfApi, login
|
6 |
import os
|
7 |
from datetime import datetime
|
8 |
+
import markdown
|
9 |
|
10 |
hf_api = HfApi()
|
11 |
HF_TOKEN = os.getenv('HF_TOKEN')
|
|
|
44 |
<div style="border: 1px solid white; background-color: black;
|
45 |
padding: 10px; margin: 5px;">
|
46 |
<strong style="color: white;">Answer 1:</strong>
|
47 |
+
<div style="color: white;">{markdown.markdown(response)}</div>
|
48 |
</div>
|
49 |
'''
|
50 |
def format_response_2_html(response):
|
|
|
52 |
<div style="border: 1px solid white; background-color: black;
|
53 |
padding: 10px; margin: 5px;">
|
54 |
<strong style="color: white;">Answer 2:</strong>
|
55 |
+
<div style="color: white;">{markdown.markdown(response)}</div>
|
56 |
</div>
|
57 |
'''
|
58 |
|