|
import gradio as gr |
|
import sambanova_gradio |
|
|
|
css = ''' |
|
.gradio-container{max-width: 1000px !important} |
|
h1{text-align:center} |
|
footer { |
|
visibility: hidden |
|
} |
|
''' |
|
|
|
with gr.Blocks(fill_height=True,css=css) as demo: |
|
with gr.Tab("1B"): |
|
gr.load("Meta-Llama-3.2-1B-Instruct", |
|
src=sambanova_gradio.registry, |
|
examples=["Explain quantum gravity to a 5-year old.", "How many R are there in the word Strawberry? Think step by step."]) |
|
|
|
with gr.Tab("3B"): |
|
gr.load("Meta-Llama-3.2-3B-Instruct", |
|
src=sambanova_gradio.registry, |
|
examples=["Explain quantum gravity to a 5-year old.", "How many R are there in the word Strawberry? Think step by step."]) |
|
|
|
with gr.Tab("8B"): |
|
gr.load("Meta-Llama-3.1-8B-Instruct", |
|
src=sambanova_gradio.registry, |
|
examples=["Explain quantum gravity to a 5-year old.", "How many R are there in the word Strawberry? Think step by step."]) |
|
|
|
with gr.Tab("70B"): |
|
gr.load('Meta-Llama-3.1-70B-Instruct-8k', |
|
src=sambanova_gradio.registry, |
|
examples=["Explain quantum gravity to a 5-year old.", "How many R are there in the word Strawberry? Think step by step."]) |
|
|
|
with gr.Tab("405B"): |
|
gr.load('Meta-Llama-3.1-405B-Instruct', |
|
src=sambanova_gradio.registry, |
|
examples=["Explain quantum gravity to a 5-year old.", "How many R are there in the word Strawberry? Think step by step."]) |
|
|
|
gr.Markdown("### Get Sambanova API : [Visit here](https://cloud.sambanova.ai/apis) & Duplicate the space to avoid queue") |
|
|
|
demo.launch() |