Generative AI Tutorial
Generative AI Tutorial
jupyter notebook
### Example:
```python
# This is a comment
my_variable = 10 # Assigning a value
```
# 2. Essentials of Generative AI, Prompt Engineering & ChatGPT
## Understanding Generative AI
- How Large Language Models (LLMs) generate content
import openai
response = openai.ChatCompletion.create(
model="gpt-4",
print(response["choices"][0]["message"]["content"])
```
tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
print(tokenizer.decode(output[0]))
```
llm = OpenAI(model_name="text-davinci-003")
print(response)
```
## Stable Diffusion
- How diffusion models create realistic images
- Experiment with Stable Diffusion
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4")
image.show()
```
# 6. Generative AI Governance
# 7. Capstone Project
- Apply your skills to build a working AI application
client = azure_ai.AzureOpenAIClient("your-api-key")
response = client.Completions.create(
engine="text-davinci-003",
max_tokens=50
print(response.choices[0].text)
```
## Conclusion
This tutorial provides a structured learning roadmap to master Generative AI and build real-world applicatio