Update app.py
Browse files
app.py
CHANGED
@@ -45,12 +45,46 @@ def getColorMap(kernel, gamma):
|
|
45 |
|
46 |
#XOR_TABLE markdown text
|
47 |
XOR_TABLE = """
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
"""
|
55 |
|
56 |
|
@@ -81,7 +115,7 @@ with gr.Blocks() as demo:
|
|
81 |
# xor_image = Image.open("xor.png")
|
82 |
with gr.Column().style(text-align=center):
|
83 |
gr.Markdown("## Table explaining the 'XOR' operator")
|
84 |
-
gr.
|
85 |
# gr.Image(xor_image, label="Table explaining the 'XOR' operator")
|
86 |
|
87 |
|
|
|
45 |
|
46 |
#XOR_TABLE markdown text
|
47 |
XOR_TABLE = """
|
48 |
+
<style type="text/css">
|
49 |
+
.tg {border-collapse:collapse;border-spacing:0;}
|
50 |
+
.tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
|
51 |
+
overflow:hidden;padding:10px 5px;word-break:normal;}
|
52 |
+
.tg th{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
|
53 |
+
font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;}
|
54 |
+
.tg .tg-c3ow{border-color:inherit;text-align:center;vertical-align:top}
|
55 |
+
table {margin:auto;}
|
56 |
+
</style>
|
57 |
+
<table class="tg">
|
58 |
+
<thead>
|
59 |
+
<tr>
|
60 |
+
<th class="tg-c3ow">A</th>
|
61 |
+
<th class="tg-c3ow">B</th>
|
62 |
+
<th class="tg-c3ow">A XOR B</th>
|
63 |
+
</tr>
|
64 |
+
</thead>
|
65 |
+
<tbody>
|
66 |
+
<tr>
|
67 |
+
<td class="tg-c3ow">0</td>
|
68 |
+
<td class="tg-c3ow">0</td>
|
69 |
+
<td class="tg-c3ow">0</td>
|
70 |
+
</tr>
|
71 |
+
<tr>
|
72 |
+
<td class="tg-c3ow">0</td>
|
73 |
+
<td class="tg-c3ow">1</td>
|
74 |
+
<td class="tg-c3ow">1</td>
|
75 |
+
</tr>
|
76 |
+
<tr>
|
77 |
+
<td class="tg-c3ow">1</td>
|
78 |
+
<td class="tg-c3ow">0</td>
|
79 |
+
<td class="tg-c3ow">1</td>
|
80 |
+
</tr>
|
81 |
+
<tr>
|
82 |
+
<td class="tg-c3ow">1</td>
|
83 |
+
<td class="tg-c3ow">1</td>
|
84 |
+
<td class="tg-c3ow">0</td>
|
85 |
+
</tr>
|
86 |
+
</tbody>
|
87 |
+
</table>
|
88 |
"""
|
89 |
|
90 |
|
|
|
115 |
# xor_image = Image.open("xor.png")
|
116 |
with gr.Column().style(text-align=center):
|
117 |
gr.Markdown("## Table explaining the 'XOR' operator")
|
118 |
+
gr.HTML(XOR_TABLE)
|
119 |
# gr.Image(xor_image, label="Table explaining the 'XOR' operator")
|
120 |
|
121 |
|