Skip to content

Commit b77b836

Browse files
committed
可以直接选择文件,不用放进文件夹
1 parent 6c79dd6 commit b77b836

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

README.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,42 @@
1-
# 请注意!此仓库为顾瑶版克隆仓库,主仓库为 https://github.com/fslongjin/TextRecogn
2-
3-
# TextRecogn顾瑶版
1+
# TextRecogn
42
为你检测AI创作的痕迹
53

64
## 在线体验
7-
85
[textrecogn.longjin666.cn](https://textrecogn.longjin666.cn)
9-
106
在线版本上传的数据,将在4小时后删除!
11-
127
为保护数据隐私,使用在线版的时候,请务必设置复杂的下载密码!
138

149
## 如何使用
15-
暂未完工,完工后提供下载
10+
如果你想自己构建Docker镜像
11+
docker build -t loooongjin/text_recogn:ernie3-nano .
12+
如果你想直接拉取已经构建好的
13+
docker pull loooongjin/text_recogn:ernie3-nano
14+
在服务端运行
15+
docker run --rm -it -p 8000:8000 loooongjin/text_recogn:ernie3-nano
16+
服务端运行完毕后,在命令行中输入
17+
python check.py
18+
19+
## 推荐运行环境
20+
Python 3.12.2 https://www.python.org/downloads/release/python-3122/
21+
tk 0.1.0
22+
requests 2.31.0
1623

1724
## AD: DragonOS龙操作系统
18-
1925
DragonOS是使用Rust自研内核的,具有Linux二进制兼容性的服务器操作系统。它由社区驱动开发,完全商业中立,Rust内核操作系统全国排行(按github star排序)稳居前3名!
20-
2126
- 仓库:https://github.com/DragonOS-Community/DragonOS
2227
- 官网:https://dragonos.org
2328

24-
2529
## 本项目贡献者
26-
2730
- [@fslongjin](https://github.com/fslongjin)
2831
- [@zhuweihao12138](https://github.com/zhuweihao12138)
29-
32+
- [@Guyao146](https://github.com/guyao146)
3033

3134
## 赞赏本项目
32-
3335
**赞赏资金在扣除TextRecogn的在线服务的服务器成本后,多余款项将全部捐入DragonOS社区公款账户!**
3436

3537
<img src="./static/sponsor.jpg" width="300px" />
3638

37-
38-
3939
## 关于训练数据
40-
4140
数据集来自 `HC3 数据集`,本模型(基于ernie3-nano)在其中英文数据上进行了约7个epoch的微调,随机分了3万条数据作为测试集(中英文各50%)
42-
4341
- Ernie3-nano版本:测试集正确率94.1%
4442
- Ernie3-base版本:测试集正确率97.41% (稍后开源,这几天有点忙)

check.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,19 @@
2424
format='[%(levelname)s] - %(message)s',
2525
)
2626

27+
print("")
2728
print("感谢使用TextRecogn项目,原作者为@fslongjin,贡献者@zhuweihao12138,github地址https://github.com/fslongjin/TextRecogn.")
29+
print("")
2830
print("本版本为顾瑶版,贡献者@Guyao146,github地址https://github.com/Guyao146/TextRecognAIGC-COPY")
31+
print("")
2932
print("日志仅保存在本地用于诊断脚本问题,不上传至服务器,请放心使用")
33+
print("")
3034

3135
logging.info('感谢使用TextRecogn项目,原作者为@fslongjin,贡献者@zhuweihao12138,github地址https://github.com/fslongjin/TextRecogn')
3236
logging.info('本版本为顾瑶版,贡献者@Guyao146,github地址https://github.com/Guyao146/TextRecognAIGC-COPY')
3337
logging.info('本日志仅保存在本地用于诊断脚本问题,不上传至服务器,请放心使用')
3438

35-
URL = "http://47.113.179.107:8000/ai_check"
39+
URL = "http://location:8000/ai_check"
3640

3741
def select_file():
3842
root = tk.Tk()
@@ -50,6 +54,7 @@ def select_file():
5054
if response.status_code != 200:
5155
logging.error(f"网络请求失败,状态码{response.status_code} 返回信息{response.text}")
5256
print(f"网络请求失败,状态码{response.status_code} 返回信息{response.text}")
57+
print("")
5358
else:
5459
# 将结果保存到 output_dir
5560
output_file = os.path.join(output_dir, os.path.basename(file_path))
@@ -58,3 +63,4 @@ def select_file():
5863

5964
logging.info(f"处理结束,结果已保存到 {output_file}")
6065
print(f"处理结束,结果已保存到 {output_file}")
66+
print("")

0 commit comments

Comments
 (0)