{ "cells": [ { "cell_type": "markdown", "id": "d444d3ce", "metadata": {}, "source": [ "# Build and Deploy a Multimodal Chatbot\n", "\n", "Queens University - GenAI - From Studio 2, Lab 2\n", "\n", "references: \n", "\n", "medium: [Build and Deploy a Multimodal Chatbot with Gemini API](https://medium.com/@turna.fardousi/building-a-multimodal-chatbot-with-gemini-api-8015bfbee538)\n", "\n", "hugging face space [Gemini 2.0 Multimodal Chatbot](https://huggingface.co/spaces/Rahatara/Gemini2)" ] }, { "cell_type": "code", "execution_count": 1, "id": "1cd185e6", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "It learns from data to recognize patterns and make predictions or decisions.\n" ] } ], "source": [ "from google import genai\n", "GEMINI_API_KEY = 'AIzaSyCMOojm7aZCdHsN1n6DKQRj4IWl9J9MuVs'\n", "\n", "client = genai.Client(api_key=GEMINI_API_KEY)\n", "\n", "response = client.models.generate_content(\n", " model=\"gemini-2.5-flash\", contents=\"Explain how AI works in a few words\"\n", ")\n", "print(response.text)" ] } ], "metadata": { "kernelspec": { "display_name": "llmgroq", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.12" } }, "nbformat": 4, "nbformat_minor": 5 }