arwnsyh commited on
Commit
d285ec9
Β·
1 Parent(s): d93ff52

Fix README encoding

Browse files
Files changed (1) hide show
  1. README.md +11 -141
README.md CHANGED
@@ -1,152 +1,22 @@
1
  ---
2
  title: Factify Models
3
- emoji: 🧠
4
- colorFrom: pink
5
  colorTo: purple
6
  sdk: docker
7
  pinned: false
8
  app_port: 7860
9
  ---
10
 
11
- # 🧠 Factify ML Server
12
 
13
- Backend ML API untuk verifikasi konten Factify menggunakan Flask dan berbagai model AI/ML.
14
 
15
- ## πŸš€ Quick Start
16
 
17
- ```bash
18
- # Create virtual environment
19
- python -m venv venv
20
-
21
- # Activate (Windows)
22
- venv\Scripts\activate
23
-
24
- # Install dependencies
25
- pip install -r requirements.txt
26
-
27
- # Run server
28
- python app.py --debug
29
- ```
30
-
31
- Server akan berjalan di `http://localhost:5000`
32
-
33
- ## πŸ“‘ API Endpoints
34
-
35
- ### Health Check
36
- ```bash
37
- GET /health
38
- ```
39
-
40
- ### Verify Text
41
- ```bash
42
- POST /verify/text
43
- Content-Type: application/json
44
-
45
- {
46
- "text": "Berita yang akan diverifikasi..."
47
- }
48
- ```
49
-
50
- ### Verify URL
51
- ```bash
52
- POST /verify/url
53
- Content-Type: application/json
54
-
55
- {
56
- "url": "https://example.com/article"
57
- }
58
- ```
59
-
60
- ### Verify Image
61
- ```bash
62
- # Via URL
63
- POST /verify/image
64
- Content-Type: application/json
65
- {
66
- "image_url": "https://example.com/image.jpg"
67
- }
68
-
69
- # Via File Upload
70
- POST /verify/image
71
- Content-Type: multipart/form-data
72
- image: [file]
73
-
74
- # Via Base64
75
- POST /verify/image
76
- Content-Type: application/json
77
- {
78
- "image_base64": "data:image/jpeg;base64,..."
79
- }
80
- ```
81
-
82
- ### Verify Video
83
- ```bash
84
- # Via URL
85
- POST /verify/video
86
- Content-Type: application/json
87
- {
88
- "video_url": "https://youtube.com/watch?v=..."
89
- }
90
-
91
- # Via File Upload
92
- POST /verify/video
93
- Content-Type: multipart/form-data
94
- video: [file]
95
- ```
96
-
97
- ## πŸ“Š Response Format
98
-
99
- ```json
100
- {
101
- "request_id": "uuid",
102
- "content_type": "text|url|image|video",
103
- "score": 75.5,
104
- "confidence": 0.85,
105
- "status": "Kredibel|Cukup Kredibel|Perlu Perhatian|Tidak Kredibel",
106
- "status_color": "#4ECDC4",
107
- "source": "analyzed content source",
108
- "ai_summary": "AI generated summary...",
109
- "main_findings": "Key findings...",
110
- "need_attention": "Warning items...",
111
- "about_source": "Source information...",
112
- "detailed_analysis": {},
113
- "analysis_time": 2.5,
114
- "timestamp": "2024-01-01T00:00:00"
115
- }
116
- ```
117
-
118
- ## πŸ”§ Configuration
119
-
120
- Environment variables (optional):
121
- ```env
122
- GEMINI_API_KEY=your-key # For AI summaries
123
- PORT=5000 # Server port
124
- DEBUG=true # Debug mode
125
- ```
126
-
127
- ## πŸ“ Structure
128
-
129
- ```
130
- server/
131
- β”œβ”€β”€ app.py # Flask API server
132
- β”œβ”€β”€ models/
133
- β”‚ β”œβ”€β”€ verification_engine.py # Main orchestrator
134
- β”‚ β”œβ”€β”€ text_analyzer.py # Text analysis
135
- β”‚ β”œβ”€β”€ url_analyzer.py # URL analysis
136
- β”‚ β”œβ”€β”€ image_analyzer.py # Image analysis
137
- β”‚ └── video_analyzer.py # Video analysis
138
- β”œβ”€β”€ requirements.txt
139
- └── README.md
140
- ```
141
-
142
- ## πŸ§ͺ Testing
143
-
144
- ```bash
145
- # Health check
146
- curl http://localhost:5000/health
147
-
148
- # Test text verification
149
- curl -X POST http://localhost:5000/verify/text \
150
- -H "Content-Type: application/json" \
151
- -d '{"text": "Sample text to verify"}'
152
- ```
 
1
  ---
2
  title: Factify Models
3
+ emoji: πŸ€–
4
+ colorFrom: blue
5
  colorTo: purple
6
  sdk: docker
7
  pinned: false
8
  app_port: 7860
9
  ---
10
 
11
+ # Factify ML Server
12
 
13
+ Backend ML API untuk verifikasi konten Factify menggunakan Flask dan Gemini AI.
14
 
15
+ ## API Endpoints
16
 
17
+ - `GET /health` - Health check
18
+ - `POST /verify/text` - Verify text content
19
+ - `POST /verify/url` - Verify URL/website
20
+ - `POST /verify/image` - Verify image for manipulation
21
+ - `POST /verify/video` - Verify video for deepfake
22
+ - `POST /challenge/evaluate` - Evaluate challenge answers