Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ def process_image(image):
|
|
| 27 |
return generated_text
|
| 28 |
|
| 29 |
title = "Hist-TrOCR"
|
| 30 |
-
description = "Interactive demo of Hist-TrOCR, a fine-tuned version of Microsoft's TrOCR which is an end-to-end transformer model used for recognition of text from single-line or word images. It has been fine-tuned on historical text images. Upload an image and click 'submit' to get the transcriptions. Results may take a few seconds to show up."
|
| 31 |
|
| 32 |
# image1 = Image.open(images_location_1 + data_1['file_name'][10])
|
| 33 |
# image = Image.open(images_location_1 + data_1['file_name'][11])
|
|
@@ -37,6 +37,6 @@ iface = gr.Interface(fn=process_image,
|
|
| 37 |
inputs=gr.inputs.Image(type="pil"),
|
| 38 |
outputs=gr.outputs.Textbox(),
|
| 39 |
title=title,
|
| 40 |
-
examples=[["302-12-05.png"]]
|
| 41 |
description=description)
|
| 42 |
iface.launch(debug=True)
|
|
|
|
| 27 |
return generated_text
|
| 28 |
|
| 29 |
title = "Hist-TrOCR"
|
| 30 |
+
description = "Interactive demo of Hist-TrOCR, a fine-tuned version of Microsoft's TrOCR which is an end-to-end transformer model used for recognition of text from single-line or word images. It has been fine-tuned on historical text images. Upload an image (or select from the given samples) and click 'submit' to get the transcriptions. Results may take a few seconds to show up."
|
| 31 |
|
| 32 |
# image1 = Image.open(images_location_1 + data_1['file_name'][10])
|
| 33 |
# image = Image.open(images_location_1 + data_1['file_name'][11])
|
|
|
|
| 37 |
inputs=gr.inputs.Image(type="pil"),
|
| 38 |
outputs=gr.outputs.Textbox(),
|
| 39 |
title=title,
|
| 40 |
+
examples=[["302-12-05.png"]],
|
| 41 |
description=description)
|
| 42 |
iface.launch(debug=True)
|