File size: 1,103 Bytes
a3a4a49
73b954d
ad36d87
 
 
 
590f134
 
181c932
 
13b7677
181c932
 
 
 
 
 
 
 
 
 
 
 
13b7677
181c932
73b954d
 
181c932
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
import gradio as gr

# LICENSE.gradio.Apachev2 		- 	@article{abid2019gradio, title = {Gradio: Hassle-Free Sharing and Testing of ML Models in the Wild}, author = {Abid, Abubakar and Abdalla, Ali and Abid, Ali and Khan, Dawood and Alfozan, Abdulrahman and Zou, James}, journal = {arXiv preprint arXiv:1906.02569}, year = {2019},} (https://github.com/gradio-app/gradio/blob/main/LICENSE)

# LICENSE.gemma2.Apachev2		- 	Copyright 2024 DeepMind Technologies Limited (https://github.com/google-deepmind/gemma/blob/main/LICENSE)



# Load the model
model_interface = gr.load("models/google/gemma-2-2b-it")

# Create a Gradio interface with custom title and logo
def main():
    with gr.Blocks() as demo:
        # Add the title
        gr.Markdown("# Gemma 2b Demo")
        
        # Add the logo
        gr.Image("orYx logo.png", elem_id="logo", show_label=False, interactive=False)
        
        # Embed the model interface inside a Row
        with gr.Row():
            model_interface.render()  # Use render to include the prebuilt interface

    demo.launch()

if __name__ == "__main__":
    main()