Create new file
Browse files
app.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
os.system('pip3 install muggle_ocr -i https://pypi.douban.com/simple/')
|
| 3 |
+
import gradio as gr
|
| 4 |
+
import muggle_ocr
|
| 5 |
+
|
| 6 |
+
captcha_sdk = muggle_ocr.SDK(model_type=muggle_ocr.ModelType.Captcha)
|
| 7 |
+
|
| 8 |
+
def generate(input_text):
|
| 9 |
+
return "1234"
|
| 10 |
+
|
| 11 |
+
if __name__ == "__main__":
|
| 12 |
+
|
| 13 |
+
gr.Interface(
|
| 14 |
+
fn=generate,
|
| 15 |
+
inputs="text",
|
| 16 |
+
outputs="text"
|
| 17 |
+
).launch()
|