Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ demo = gr.Blocks(css='''
|
|
28 |
#chedan {-webkit-transition-duration: 0.4s; transition-duration: 0.4s; border-radius: 40%}
|
29 |
#chedan:hover {background-color: #4CAF50; color: white;}
|
30 |
#chedan:active {background-color: #3e8e41; box-shadow: 0 5px #666; transform: translateY(4px);}
|
31 |
-
#
|
32 |
''')
|
33 |
|
34 |
def fx1(x):
|
@@ -99,7 +99,7 @@ with demo:
|
|
99 |
with gr.TabItem("Excel365测试"):
|
100 |
gr.HTML(value=ht_text,label="在线版演示",show_label=True)
|
101 |
with gr.TabItem("OCR识别"):
|
102 |
-
ocr_input=[gr.Image(type='file', label='请提供你需要识别的照片'),gr.Dropdown(choices=['中文','英文','法文','德文','韩文','日文'], type="value", default='中文', label='请选择需要识别的语言')]
|
103 |
ocr_output=gr.Image(type='file', label='识别结果')
|
104 |
ocr_button = gr.Button("开始ocr识别")
|
105 |
|
|
|
28 |
#chedan {-webkit-transition-duration: 0.4s; transition-duration: 0.4s; border-radius: 40%}
|
29 |
#chedan:hover {background-color: #4CAF50; color: white;}
|
30 |
#chedan:active {background-color: #3e8e41; box-shadow: 0 5px #666; transform: translateY(4px);}
|
31 |
+
#tpkj:hover {content: '请拖拽或选择需要OCR识别的图片至此处';}
|
32 |
''')
|
33 |
|
34 |
def fx1(x):
|
|
|
99 |
with gr.TabItem("Excel365测试"):
|
100 |
gr.HTML(value=ht_text,label="在线版演示",show_label=True)
|
101 |
with gr.TabItem("OCR识别"):
|
102 |
+
ocr_input=[gr.Image(type='file', label='请提供你需要识别的照片',elem_id='tpkj'),gr.Dropdown(choices=['中文','英文','法文','德文','韩文','日文'], type="value", default='中文', label='请选择需要识别的语言')]
|
103 |
ocr_output=gr.Image(type='file', label='识别结果')
|
104 |
ocr_button = gr.Button("开始ocr识别")
|
105 |
|