Spaces:
Runtime error
Runtime error
Commit
·
5e74ed8
1
Parent(s):
f095f70
change output label
Browse files
app.py
CHANGED
@@ -77,7 +77,7 @@ def create_time_plot(attribution):
|
|
77 |
tmpfile = BytesIO()
|
78 |
fig.savefig(tmpfile, format='png')
|
79 |
encoded = base64.b64encode(tmpfile.getvalue()).decode('utf-8')
|
80 |
-
html = '<div>' + '<img src="data:image/png;charset=utf-8;base64,{}">'.format(encoded) + '</div>'
|
81 |
|
82 |
return html
|
83 |
def get_subregion_name(id, region_map):
|
@@ -185,6 +185,7 @@ def main(text):
|
|
185 |
</style>
|
186 |
</head>
|
187 |
<body>
|
|
|
188 |
<div class="container">
|
189 |
<table cellspacing="0">
|
190 |
<tr>
|
@@ -267,7 +268,7 @@ with open('example_input.txt', encoding='utf8') as f:
|
|
267 |
gradio.Interface(
|
268 |
main,
|
269 |
inputs=gradio.inputs.Textbox(lines=3),
|
270 |
-
outputs=['html', gradio.outputs.Label(label='Geographical Attribution'),
|
271 |
examples=examples,
|
272 |
title='Spaces Demo for Ithaca',
|
273 |
description='Restoration and Attribution of ancient Greek texts made by DeepMind. Represent missing characters as "-", and characters to be predicted as "?" (up to 10, does not need to be consecutive)<br> <br><a href="https://ithaca.deepmind.com/" target="_blank">blogpost</a>').launch(enable_queue=True)
|
|
|
77 |
tmpfile = BytesIO()
|
78 |
fig.savefig(tmpfile, format='png')
|
79 |
encoded = base64.b64encode(tmpfile.getvalue()).decode('utf-8')
|
80 |
+
html = '<h3> Chronological Attribution </h3>' + '<div>' + '<img src="data:image/png;charset=utf-8;base64,{}">'.format(encoded) + '</div>'
|
81 |
|
82 |
return html
|
83 |
def get_subregion_name(id, region_map):
|
|
|
185 |
</style>
|
186 |
</head>
|
187 |
<body>
|
188 |
+
<h3> Restoration </h3>
|
189 |
<div class="container">
|
190 |
<table cellspacing="0">
|
191 |
<tr>
|
|
|
268 |
gradio.Interface(
|
269 |
main,
|
270 |
inputs=gradio.inputs.Textbox(lines=3),
|
271 |
+
outputs=['html', gradio.outputs.Label(label='Geographical Attribution'), 'html'],
|
272 |
examples=examples,
|
273 |
title='Spaces Demo for Ithaca',
|
274 |
description='Restoration and Attribution of ancient Greek texts made by DeepMind. Represent missing characters as "-", and characters to be predicted as "?" (up to 10, does not need to be consecutive)<br> <br><a href="https://ithaca.deepmind.com/" target="_blank">blogpost</a>').launch(enable_queue=True)
|