prithivMLmods commited on
Commit
0c77a13
1 Parent(s): 57ba18c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -26
app.py CHANGED
@@ -17,6 +17,9 @@ footer {
17
  .tabs {
18
  margin-top: 20px;
19
  }
 
 
 
20
  .tab-content {
21
  min-height: 600px;
22
  }
@@ -26,31 +29,32 @@ footer {
26
  }
27
  '''
28
 
29
- with gr.Blocks(css=css, title="Enhanced Language Model Interface") as demo:
30
- gr.Markdown("# Language Model Comparison")
31
-
32
- with gr.Tabs(css_class="tabs") as tabs:
33
- for model in ["1B", "3B", "8B", "70B", "405B"]:
34
- with gr.Tab(f"{model}", css_class="tab-content"):
35
- if model == "405B":
36
- model_name = "Meta-Llama-3.1-405B-Instruct"
37
- elif model == "70B":
38
- model_name = "Meta-Llama-3.1-70B-Instruct-8k"
39
- elif model == "8B":
40
- model_name = "Meta-Llama-3.1-8B-Instruct"
41
- else:
42
- model_name = f"Meta-Llama-3.2-{model}-Instruct"
43
-
44
- gr.load(
45
- model_name,
46
- src=sambanova_gradio.registry,
47
- examples=[
48
- "Explain quantum gravity to a 5-year old.",
49
- "How many R are there in the word Strawberry? Think step by step."
50
- ],
51
- height=600
52
- )
53
-
54
- gr.Markdown("### Sambanova API Documentation : [Visit here](https://cloud.sambanova.ai/apis)")
 
55
 
56
  demo.launch()
 
17
  .tabs {
18
  margin-top: 20px;
19
  }
20
+ .tab-nav {
21
+ margin-bottom: 20px;
22
+ }
23
  .tab-content {
24
  min-height: 600px;
25
  }
 
29
  }
30
  '''
31
 
32
+ with gr.Blocks(css=css) as demo:
33
+ with gr.Tab("1B"):
34
+ gr.load("Meta-Llama-3.2-1B-Instruct",
35
+ src=sambanova_gradio.registry,
36
+ examples=["Explain quantum gravity to a 5-year old.", "How many R are there in the word Strawberry? Think step by step."])
37
+
38
+ with gr.Tab("3B"):
39
+ gr.load("Meta-Llama-3.2-3B-Instruct",
40
+ src=sambanova_gradio.registry,
41
+ examples=["Explain quantum gravity to a 5-year old.", "How many R are there in the word Strawberry? Think step by step."])
42
+
43
+ with gr.Tab("8B"):
44
+ gr.load("Meta-Llama-3.1-8B-Instruct",
45
+ src=sambanova_gradio.registry,
46
+ examples=["Explain quantum gravity to a 5-year old.", "How many R are there in the word Strawberry? Think step by step."])
47
+
48
+ with gr.Tab("70B"):
49
+ gr.load('Meta-Llama-3.1-70B-Instruct-8k',
50
+ src=sambanova_gradio.registry,
51
+ examples=["Explain quantum gravity to a 5-year old.", "How many R are there in the word Strawberry? Think step by step."])
52
+
53
+ with gr.Tab("405B"):
54
+ gr.load('Meta-Llama-3.1-405B-Instruct',
55
+ src=sambanova_gradio.registry,
56
+ examples=["Explain quantum gravity to a 5-year old.", "How many R are there in the word Strawberry? Think step by step."])
57
+
58
+ gr.Markdown("### Sambanova API Documentation : [Visit here](https://cloud.sambanova.ai/apis)")
59
 
60
  demo.launch()