|
69 | 69 | },
|
70 | 70 | {
|
71 | 71 | "cell_type": "code",
|
72 |
| - "execution_count": 1, |
| 72 | + "execution_count": 2, |
73 | 73 | "metadata": {
|
74 | 74 | "id": "a90kMgiDvNlk"
|
75 | 75 | },
|
|
111 | 111 | },
|
112 | 112 | {
|
113 | 113 | "cell_type": "code",
|
114 |
| - "execution_count": null, |
| 114 | + "execution_count": 3, |
115 | 115 | "metadata": {
|
116 | 116 | "id": "_d_yY8XWGQ12"
|
117 | 117 | },
|
118 |
| - "outputs": [], |
119 |
| - "source": [ |
120 |
| - "!pip install -U -q \"google-generativeai>=0.7.2\"" |
121 |
| - ] |
122 |
| - }, |
123 |
| - { |
124 |
| - "cell_type": "code", |
125 |
| - "execution_count": null, |
126 |
| - "metadata": { |
127 |
| - "id": "TeVyF3GtGQ13" |
128 |
| - }, |
129 |
| - "outputs": [], |
| 118 | + "outputs": [ |
| 119 | + { |
| 120 | + "name": "stdout", |
| 121 | + "output_type": "stream", |
| 122 | + "text": [ |
| 123 | + "\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/137.7 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m\u001b[90m━\u001b[0m \u001b[32m133.1/137.7 kB\u001b[0m \u001b[31m3.9 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m137.7/137.7 kB\u001b[0m \u001b[31m3.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", |
| 124 | + "\u001b[?25h" |
| 125 | + ] |
| 126 | + } |
| 127 | + ], |
130 | 128 | "source": [
|
131 |
| - "import google.generativeai as genai" |
| 129 | + "%pip install -U -q \"google-genai>=1.0.0\"" |
132 | 130 | ]
|
133 | 131 | },
|
134 | 132 | {
|
|
142 | 140 | },
|
143 | 141 | {
|
144 | 142 | "cell_type": "code",
|
145 |
| - "execution_count": null, |
| 143 | + "execution_count": 4, |
146 | 144 | "metadata": {
|
147 | 145 | "id": "iWd---jVKV5M"
|
148 | 146 | },
|
149 | 147 | "outputs": [],
|
150 | 148 | "source": [
|
151 | 149 | "from google.colab import userdata\n",
|
| 150 | + "from google import genai\n", |
152 | 151 | "\n",
|
153 | 152 | "GOOGLE_API_KEY=userdata.get('GOOGLE_API_KEY')\n",
|
154 |
| - "genai.configure(api_key=GOOGLE_API_KEY)" |
| 153 | + "client = genai.Client(api_key=GOOGLE_API_KEY)" |
155 | 154 | ]
|
156 | 155 | },
|
157 | 156 | {
|
158 | 157 | "cell_type": "code",
|
159 |
| - "execution_count": 3, |
| 158 | + "execution_count": 5, |
160 | 159 | "metadata": {
|
161 | 160 | "id": "11dbc57d09f2"
|
162 | 161 | },
|
|
165 | 164 | "name": "stdout",
|
166 | 165 | "output_type": "stream",
|
167 | 166 | "text": [
|
168 |
| - "This transcript is a record of the air-to-ground voice transmissions from the Apollo 11 mission. It covers the period from the launch of the Saturn V rocket up to the splashdown of the Apollo 11 spacecraft in the Pacific Ocean. The transcript is divided into 72 tapes. It includes communication between the astronauts (Commander Neil Armstrong, Command Module Pilot Michael Collins, and Lunar Module Pilot Edwin \"Buzz\" Aldrin) and ground control, including Mission Control Center (MCC) and other sites, and recordings from the astronauts' onboard systems.\n", |
| 167 | + "Based on the provided text, this is a transcript of air-to-ground voice communications from the Apollo 11 mission. It includes:\n", |
| 168 | + "\n", |
| 169 | + "* **Introduction:** Explains the document is a transcription of GOSS NET 1 (Technical Air-to-Ground Voice Transmission) for Apollo 11. It lists abbreviations used for different speakers (Commander, Command Module Pilot, Lunar Module Pilot, various ground control and recovery personnel).\n", |
169 | 170 | "\n",
|
170 |
| - "The transcript is a valuable resource for understanding the events of the Apollo 11 mission, and it provides insights into the personalities and working methods of the astronauts and ground control personnel. The transcript also includes a great deal of technical information about the spacecraft and the mission, such as the detailed procedures that were followed, and the readings from the spacecraft's instruments.\n", |
| 171 | + "* **Abbreviations Key:** Provides a key to understand who the different communicators are (e.g., CDR = Commander, CMP = Command Module Pilot, CC = Capsule Communicator).\n", |
| 172 | + "\n", |
| 173 | + "* **Air-to-Ground Voice Transcription:** The main body of the document, which is the transcribed dialogue between the Apollo 11 astronauts and mission control in Houston, as well as other ground stations. The text is segmented by timecode and location (e.g., MILA, GRAND BAHAMA ISLANDS, CANARY). It covers various aspects of the mission from launch to initial post-splashdown communications.\n", |
| 174 | + "\n", |
| 175 | + "In short, this is the official record of what was said between the Apollo 11 crew and ground control during the mission, providing a detailed account of procedures, observations, and conversations.\n", |
171 | 176 | "\n"
|
172 | 177 | ]
|
173 | 178 | }
|
174 | 179 | ],
|
175 | 180 | "source": [
|
176 |
| - "model = genai.GenerativeModel('gemini-2.0-flash')\n", |
177 |
| - "\n", |
178 |
| - "response = model.generate_content(['What is this transcript?', text_data])\n", |
| 181 | + "MODEL_ID = \"gemini-2.0-flash\" # @param [\"gemini-2.0-flash-lite\",\"gemini-2.0-flash\",\"gemini-2.0-pro-exp-02-05\"] {\"allow-input\":true, isTemplate: true}\n", |
| 182 | + "response = client.models.generate_content(\n", |
| 183 | + " model=MODEL_ID,\n", |
| 184 | + " contents=[\n", |
| 185 | + " 'What is this transcript?',\n", |
| 186 | + " text_data\n", |
| 187 | + " ]\n", |
| 188 | + ")\n", |
179 | 189 | "print(response.text)"
|
180 | 190 | ]
|
181 | 191 | }
|
|
0 commit comments