How hasnainnqv/texpose-deployment works
This repository is a web-based AI-text detector. A user submits text through the FastAPI page; the classify route runs a two-stage prediction and returns the result in the page. The classifier cleans text, applies a BERT human-versus-AI model, and, for AI predictions, applies a second model to identify a likely LLM. At startup, the app loads model weights and a tokenizer; missing weights are downloaded. The tree also includes static informational pages and assets. Source evidence is limited to the excerpts and index, so links among unsampled pages are omitted.
Main entry points: main.py FastAPI app · classifier_model.py Model loader · index.html Classifier page · static Static pages and assets
Components 13
Web interface
- FastAPI app
app/main.py - Classifier page
app/templates/index.html - Static pages and assets
app/static
Text classification
- Text cleaning
app/classifier_model.py - Human-AI model
app/classifier_model.py - LLM classifier
app/classifier_model.py
Model resources
- BERT tokenizer
app/classifier_model.py - Model loader
app/classifier_model.py - Local model weights
Other components
- User
- Hugging Face
- Google Drive
- NLTK stopwords
Connections 12
- User → FastAPI app: submits text
app/main.py - FastAPI app → Classifier page: renders
app/main.py - FastAPI app → Static pages and assets: serves assets
app/main.py - FastAPI app → Model loader: loads models
app/main.py - FastAPI app → Text cleaning: classifies text
app/main.py - Text cleaning → BERT tokenizer: encodes text
app/classifier_model.py - Text cleaning → NLTK stopwords: removes stopwords
app/classifier_model.py - BERT tokenizer → Human-AI model: provides tokens
app/classifier_model.py - Human-AI model → LLM classifier: dispatches AI cases
app/classifier_model.py - Model loader → Hugging Face: loads pretrained tokenizer
app/classifier_model.py - Model loader → Local model weights: loads weights
app/classifier_model.py - Model loader → Google Drive: downloads missing weights
app/classifier_model.py