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()