{"id":25231883,"url":"https://github.com/ganeshborkar31/language-predictor","last_synced_at":"2026-04-09T17:47:22.431Z","repository":{"id":254068218,"uuid":"845388021","full_name":"ganeshborkar31/Language-predictor","owner":"ganeshborkar31","description":"Language Detector  web app using Fastapi and vectorization","archived":false,"fork":false,"pushed_at":"2024-08-21T11:11:58.000Z","size":444,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T15:46:48.485Z","etag":null,"topics":["aws","aws-ec2","css","deployment","fastapi","html","javascript","language","language-prediction","machine-learning","mlops","python","python3"],"latest_commit_sha":null,"homepage":"http://13.233.77.16:8000/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ganeshborkar31.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-21T06:41:34.000Z","updated_at":"2024-08-21T11:12:02.000Z","dependencies_parsed_at":"2025-02-11T12:49:50.332Z","dependency_job_id":null,"html_url":"https://github.com/ganeshborkar31/Language-predictor","commit_stats":null,"previous_names":["ganeshborkar31/language-detector"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ganeshborkar31/Language-predictor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganeshborkar31%2FLanguage-predictor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganeshborkar31%2FLanguage-predictor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganeshborkar31%2FLanguage-predictor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganeshborkar31%2FLanguage-predictor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ganeshborkar31","download_url":"https://codeload.github.com/ganeshborkar31/Language-predictor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganeshborkar31%2FLanguage-predictor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269693593,"owners_count":24460248,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-ec2","css","deployment","fastapi","html","javascript","language","language-prediction","machine-learning","mlops","python","python3"],"created_at":"2025-02-11T12:37:58.195Z","updated_at":"2025-12-30T21:48:14.630Z","avatar_url":"https://github.com/ganeshborkar31.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Language Prediction Web App\n\n## Overview\n\nThe Language Prediction Web App is a tool for predicting the language of a given text. Built using FastAPI for the backend and HTML, CSS, and JavaScript for the frontend, this application provides a user-friendly interface for language detection. It handles various inputs and displays appropriate messages for both prediction and errors.\n\n## Features\n\n- **Language Prediction**: Predict the language of a given text using an ML model.\n- **Responsive Design**: Optimized for both desktop and mobile devices.\n- **Error Handling**: Displays a user-friendly message when no text is entered.\n- **Loading Indicator**: Shows a loading message while processing the prediction.\n\n\n## Project Structure\n\nThe project is organized as follows:\n```\nLanguage-predictor/\n├── app\n│   ├── main.py\n│   ├── model\n│   │   ├── model.py\n│   │   └── trained_pipeline-0.1.0.pkl\n│   ├── requirements.txt\n│   ├── static\n│   │   ├── css\n│   │   │   └── styles.css\n│   │   └── js\n│   │       └── script.js\n│   └── templates\n│       └── index.html\n└── README.md\n```\n\n## Getting Started\n\n### Prerequisites\n\nEnsure you have the following installed:\n\n- **Python 3.7+**: Required for running the FastAPI application.\n- **pip**: Python package installer.\n\n### Installation\n\n1. **Clone the Repository**\n\n   ```bash\n   git clone https://github.com/ganeshborkar31/Language-predictor.git\n   cd Language-predictor\n\n2. **Create and Activate a Virtual Environment**\n\n    ```bash\n    python -m venv myvenv\n    source myvenv/bin/activate  # On Windows, use `myvenv\\Scripts\\activate`\n\n3. **Install the required packages:**\n\n    ```bash\n    pip install -r requirements.txt\n\n4. **Ensure requirements.txt includes:**\n    ```Copy code \n    fastapi\n    uvicorn\n    pydantic\n    scikit-learn\n    \n    \n\n5. **Run the FastAPI application:**\n\n    ```bash\n    cd app\n    python -m uvicorn app.main:app --reload\n\nThe application will be available at http://127.0.0.1:8000.\n\n## Usage\n\n1. Open your browser and navigate to http://127.0.0.1:8000.\n2. Enter the text you want to analyze in the text box.\n3. Click the \"Predict\" button.\n4. The predicted language or an error message will be displayed below the button.\n\n## API Endpoints\n### POST /predict/\n\n- Request Body:\n\n    ```json\n    {\n    \"text\": \"input text\"\n    }\n\n- Response:\n\n    - On success:\n\n       ```json\n   \n       {\n       \"language\": \"Predicted Language\"\n       }\n       ```\n\n     - On error (empty input):\n\n       ```json\n   \n       {\n       \"error\": \"Please enter some text.\"\n       }\n       ```\n## **Troubleshooting**\n\n1. #### Error: TypeError: expected string or bytes-like object, got 'TextInput'\n    - Solution: Ensure the input is a string and properly extracted in the FastAPI endpoint.\n \n2. #### To ensure that your Python server remains running after you disconnect from an SSH session, you can use several methods. Given your command python -m uvicorn main:app --host 0.0.0.0 --port 8000, here are some effective ways to keep it running:\n- Using nohup\n\n  1. The nohup (no hang-up) command allows processes to continue running in the background even after you log out from the SSH session.\n\n     - Run the Command with nohup:\n\n       ```bash\n       nohup python -m uvicorn main:app --host 0.0.0.0 --port 8000 \u003e server.log 2\u003e\u00261 \u0026\n       ````\n\n   2. nohup: Prevents the process from being stopped when you log out.\n       \u003e server.log 2\u003e\u00261: Redirects both stdout and stderr to server.log.\n       \u0026: Runs the command in the background.\n\n      - Verify the Process:\n\n          - You can check if the server is running by looking for the process:\n\n          ```bash\n          ps aux | grep uvicorn\n          ```\n\n   3. Stop the Process (if needed):\n\n       - To stop the process, you’ll need to find its process ID (PID) and then kill it:\n\n       ```bash\n         kill \u003cPID\u003e\n\n## **Contact**\n- ganeshborkar107@gmail.com\n\n### Summary of the `README.md` Sections\n\n1. **Overview**: Brief introduction to what the project does.\n2. **Project Structure**: Overview of the project directory and files.\n3. **Getting Started**: Instructions to set up and run the project locally.\n4. **Usage**: How to use the web application.\n5. **API Endpoints**: Details of the API endpoint used by the frontend.\n6. **Troubleshooting**: Common issues and their solutions.\n7. **Contact**: Contact information for feedback or questions.\n\nFeel free to adjust the content according to your project's specific details and requirements!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fganeshborkar31%2Flanguage-predictor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fganeshborkar31%2Flanguage-predictor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fganeshborkar31%2Flanguage-predictor/lists"}