trissondon
commited on
Commit
·
e4cecdd
1
Parent(s):
9b453b2
Updated app
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import os
|
2 |
-
os.system("pip uninstall -y gradio")
|
3 |
-
os.system("pip install gradio==4.19.0")
|
4 |
os.system('pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu')
|
5 |
|
6 |
import gradio as gr
|
@@ -103,11 +103,11 @@ article="<b>References</b><br>[1] Y. Xu et al., “LayoutLMv3: Pre-training for
|
|
103 |
css = """.output_image, .input_image {height: 600px !important}"""
|
104 |
|
105 |
iface = gr.Interface(fn=process_image,
|
106 |
-
inputs=gr.
|
107 |
-
outputs=gr.
|
108 |
title=title,
|
109 |
description=description,
|
110 |
-
article=article,
|
111 |
# examples=examples,
|
112 |
css=css,
|
113 |
analytics_enabled = True, enable_queue=True)
|
|
|
1 |
import os
|
2 |
+
#os.system("pip uninstall -y gradio")
|
3 |
+
#os.system("pip install gradio==4.19.0")
|
4 |
os.system('pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu')
|
5 |
|
6 |
import gradio as gr
|
|
|
103 |
css = """.output_image, .input_image {height: 600px !important}"""
|
104 |
|
105 |
iface = gr.Interface(fn=process_image,
|
106 |
+
inputs=gr.Image(type="pil"),
|
107 |
+
outputs=gr.Image(type="pil", label="annotated image"),
|
108 |
title=title,
|
109 |
description=description,
|
110 |
+
# article=article,
|
111 |
# examples=examples,
|
112 |
css=css,
|
113 |
analytics_enabled = True, enable_queue=True)
|