#!/bin/bash echo "🚀 AI Lab API Demo" echo "==================" echo "" # Configuration API_BASE="http://127.0.0.1:8000" echo "📊 Health Check:" curl -s -X GET "$API_BASE/health" | python3 -m json.tool echo "" echo "😊 Sentiment Analysis:" curl -s -X POST "$API_BASE/sentiment" \ -H "Content-Type: application/json" \ -d '{"text": "This API is absolutely amazing! I love it!"}' | python3 -m json.tool echo "" echo "🔍 Named Entity Recognition:" curl -s -X POST "$API_BASE/ner" \ -H "Content-Type: application/json" \ -d '{"text": "Apple Inc. was founded by Steve Jobs in Cupertino, California."}' | python3 -m json.tool echo "" echo "❓ Question Answering:" curl -s -X POST "$API_BASE/qa" \ -H "Content-Type: application/json" \ -d '{ "question": "Who founded Apple?", "context": "Apple Inc. was founded by Steve Jobs, Steve Wozniak, and Ronald Wayne in April 1976." }' | python3 -m json.tool echo "" echo "� Fill Mask:" curl -s -X POST "$API_BASE/fillmask" \ -H "Content-Type: application/json" \ -d '{"text": "The capital of France is [MASK]."}' | python3 -m json.tool echo "" echo "🛡️ Content Moderation:" curl -s -X POST "$API_BASE/moderation" \ -H "Content-Type: application/json" \ -d '{"text": "This is a completely normal and safe text."}' | python3 -m json.tool echo "" echo "✍️ Text Generation:" curl -s -X POST "$API_BASE/textgen" \ -H "Content-Type: application/json" \ -d '{"text": "Once upon a time, in a distant galaxy"}' | python3 -m json.tool echo "" echo "📦 Batch Sentiment Analysis:" curl -s -X POST "$API_BASE/sentiment/batch" \ -H "Content-Type: application/json" \ -d '{ "texts": [ "I love this!", "This is terrible.", "Neutral statement here." ] }' | python3 -m json.tool echo "" echo "�🏥 Final Health Check:" curl -s -X GET "$API_BASE/health" | python3 -m json.tool echo "" echo "✅ Demo completed! Check the API documentation at: $API_BASE/docs"