File size: 1,889 Bytes
dc36c09
 
 
8c809dd
57ba18c
 
 
 
 
 
 
 
 
8c809dd
57ba18c
 
 
 
 
0c77a13
 
 
57ba18c
 
 
 
 
 
8c809dd
 
8ac1e84
0c77a13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fc31217
9fd12f1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import gradio as gr
import sambanova_gradio

css = '''
.gradio-container {
    max-width: 1200px !important;
    margin: auto;
}
h1 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 20px;
}
footer {
    visibility: hidden;
}
.tabs {
    margin-top: 20px;
}
.tab-nav {
    margin-bottom: 20px;
}
.tab-content {
    min-height: 600px;
}
.chatbot {
    height: 500px;
    overflow-y: auto;
}
'''

with gr.Blocks(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("### Sambanova API Documentation : [Visit here](https://cloud.sambanova.ai/apis)") 

demo.launch()