Download apps/document_recognition/migrations/0001_initial.py from jun2024/fc: direct link, hf CLI and curl.
- Browser
- Download file 4.13 kB
-
https://huggingface.co/spaces/jun2024/fc/resolve/main/apps/document_recognition/migrations/0001_initial.py
- Command line
-
hf download hf://spaces/jun2024/fc/apps/document_recognition/migrations/0001_initial.py
-
curl -L -o 0001_initial.py https://huggingface.co/spaces/jun2024/fc/resolve/main/apps/document_recognition/migrations/0001_initial.py
4.13 kB
| # Generated by Django 6.0.2 on 2026-03-22 12:10 | |
| from django.db import migrations, models | |
| class Migration(migrations.Migration): | |
| initial = True | |
| dependencies = [] | |
| operations = [ | |
| migrations.CreateModel( | |
| name="DocumentRecognitionTask", | |
| fields=[ | |
| ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), | |
| ("file_path", models.CharField(max_length=1024, verbose_name="文件路径")), | |
| ("original_filename", models.CharField(max_length=256, verbose_name="原始文件名")), | |
| ( | |
| "status", | |
| models.CharField( | |
| choices=[ | |
| ("pending", "待处理"), | |
| ("processing", "识别中"), | |
| ("success", "成功"), | |
| ("failed", "失败"), | |
| ], | |
| default="pending", | |
| max_length=32, | |
| verbose_name="任务状态", | |
| ), | |
| ), | |
| ("document_type", models.CharField(blank=True, max_length=32, null=True, verbose_name="文书类型")), | |
| ("case_number", models.CharField(blank=True, max_length=128, null=True, verbose_name="案号")), | |
| ("key_time", models.DateTimeField(blank=True, null=True, verbose_name="关键时间")), | |
| ("confidence", models.FloatField(blank=True, null=True, verbose_name="置信度")), | |
| ("extraction_method", models.CharField(blank=True, max_length=32, null=True, verbose_name="提取方式")), | |
| ("raw_text", models.TextField(blank=True, null=True, verbose_name="原始文本")), | |
| ( | |
| "renamed_file_path", | |
| models.CharField(blank=True, max_length=1024, null=True, verbose_name="重命名后路径"), | |
| ), | |
| ("binding_success", models.BooleanField(null=True, verbose_name="绑定成功")), | |
| ("binding_message", models.CharField(blank=True, max_length=512, null=True, verbose_name="绑定消息")), | |
| ( | |
| "binding_error_code", | |
| models.CharField(blank=True, max_length=64, null=True, verbose_name="绑定错误码"), | |
| ), | |
| ("error_message", models.TextField(blank=True, null=True, verbose_name="错误信息")), | |
| ("notification_sent", models.BooleanField(default=False, verbose_name="通知已发送")), | |
| ("notification_sent_at", models.DateTimeField(blank=True, null=True, verbose_name="通知发送时间")), | |
| ("notification_error", models.TextField(blank=True, null=True, verbose_name="通知错误信息")), | |
| ("notification_file_sent", models.BooleanField(default=False, verbose_name="文件已发送")), | |
| ("created_at", models.DateTimeField(auto_now_add=True, verbose_name="创建时间")), | |
| ("started_at", models.DateTimeField(blank=True, null=True, verbose_name="开始时间")), | |
| ("finished_at", models.DateTimeField(blank=True, null=True, verbose_name="完成时间")), | |
| ], | |
| options={ | |
| "verbose_name": "文书识别任务", | |
| "verbose_name_plural": "文书识别任务", | |
| "db_table": "automation_documentrecognitiontask", | |
| "ordering": ["-created_at"], | |
| "managed": False, | |
| }, | |
| ), | |
| migrations.CreateModel( | |
| name="DocumentRecognitionTool", | |
| fields=[ | |
| ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), | |
| ("name", models.CharField(default="Document Recognition", max_length=64)), | |
| ], | |
| options={ | |
| "verbose_name": "文书智能识别", | |
| "verbose_name_plural": "文书智能识别", | |
| "managed": False, | |
| }, | |
| ), | |
| ] | |