File size: 786 Bytes
217b57f
385bbbf
217b57f
 
 
 
 
 
 
 
 
 
 
 
 
5a3cee3
ca1b20c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr
from groq import Groq
import groq_gradio
import os

# Initialize Groq client
client = Groq(
    api_key=os.environ.get("GROQ_API_KEY")
)

gr.load(
    name='llama-3.3-70b-versatile', # The specific model powered by Groq to use
    src=groq_gradio.registry, # Tells Gradio to use our custom interface registry as the source
    title='Groq-Gradio Integration', # The title shown at the top of our UI
    description="Chat with the Llama 3.3 70B model powered by Groq.", # Subtitle
    examples=["Explain quantum gravity to a 5-year old.", "Tell me a high fantasy, dungeons and dragons like adventure story. It must use immersive story telling and contain a wizard"] # Pre-written prompts users can click to try
).launch(pwa=True) # Creates and starts the web server!