-
AI Prativa – Smart Farming Assistant – Hugging Face API Key Setup
Smart Farming Assistant – Hugging Face API Key Setup #1 Open The Hugging Face URL https://huggingface.co/ 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
-
Jupyter Lab – How To Open Jupyter Lab In Specific Folder ?
How To Open Jupyter Lab In A Specific Folder Run The Below Command In The Folder Location Bar python -m jupyter lab – notebook-dir=”.”
-
AI Prativa – Smart Farming Assistant – OpenAI API Key Setup
Smart Farming Assistant -OpenAI API Key Setup https://platform.openai.com/ API Key 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 Trying Out New API Key #1 – Run this curl command in a terminal to generate a haiku for free using the gpt-5-nano model via the Responses API. curl https://api.openai.com/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer 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" -d '{ "model": "gpt-5-nano", "input": "write a haiku about ai", "store": true }' #2 – Install the OpenAI Node SDK and execute the code below to generate a haiku for free using the gpt-5-nano model via the Responses API. npm install openai import OpenAI from "openai"; const openai = new OpenAI({ apiKey:
-
AI Prativa -Smart Farming Assistant – Run The Python API Project
Smart Farming Assistant – Running The Python API Step-1: Extract Project cd my-python-api Step-2: Install Dependencies # Create virtual environment python -m venv venv # Activate it source venv/bin/activate # On Windows: venvScriptsactivate # Install packages pip install -r requirements.txt Step-3: Configure API Keys # Copy example file cp .env.example .env # Edit .env and add your keys: # open_ai_key=sk-your-openai-key-here # hugging_face=Bearer hf_your-huggingface-token-here Step-4: Run! # Start the server uvicorn app.main:app – -reload # Or use: python -m app.main Step-5: Visit URL http://localhost:8000 Step-6: Quick API Test Open a new terminal and run the below code to test whether the
-
AI Prativa – Smart Farming Assistant – Project Folder Setup
Smart Farming Assistant – Project Folder Setup my-python-api/ ├── app/ # Main application package │ ├── __init__.py # App initialization │ ├── main.py # FastAPI app entry point & configuration │ │ │ ├── api/ # API endpoints │ │ ├── __init__.py │ │ └── routes.py # All API routes │ │ │ ├── models/ # Data models (ORM & Pydantic) │ │ └── __init__.py │ │ │ ├── services/ # Business logic layer │ │ ├── __init__.py │ │ ├── openai_service.py # OpenAI API integration │ │ ├── audio_service.py # Text-to-Speech (gTTS) │ │ └── speech_service.py # Speech-to-Text (HuggingFace)
