updates
Browse filesFiles changed (2)
- app_allenai.py+8-37
- app_perplexity.py+1-1
123456789101112131415161718192021222324252627282930313233343536373839404142import gradio as grimport spacesimport transformers_gradio# Load Llama modeldemo = gr.load(name="akhaliq/allen-test", src="spaces")# Load OLMo modelolmo_demo = gr.load(name="akhaliq/olmo-anychat", src="spaces")# Disable API names for both demosfor fn in demo.fns.values():fn.api_name = Falsefor fn in olmo_demo.fns.values():fn.api_name = False# Create a dropdown to select the modelwith gr.Blocks() as combined_demo:model_choice = gr.Dropdown(choices=["Llama", "OLMo"],value="Llama",label="Select Model")with gr.Tab("Model Interface"):# Create placeholder for the selected model's interfaceplaceholder = gr.HTML()def update_interface(choice):if choice == "Llama":return demoelse:return olmo_demomodel_choice.change(fn=update_interface,inputs=[model_choice],outputs=[placeholder])12345678910111213import gradio as grimport spacesfrom utils import get_app# Create the combined demo using the utility functiondemo = get_app(models=["akhaliq/allen-test", "akhaliq/olmo-anychat"],default_model="akhaliq/allen-test",src="spaces")
13 unmodified lines1415161718192013 unmodified lines"llama-3.1-8b-instruct","llama-3.1-70b-instruct",],default_model="llama-3.1-sonar-large-128k-online",src=perplexity_gradio.registry,accept_token=not os.getenv("PERPLEXITY_API_KEY"),)13 unmodified lines1415161718192013 unmodified lines"llama-3.1-8b-instruct","llama-3.1-70b-instruct",],default_model="llama-3.1-sonar-huge-128k-online",src=perplexity_gradio.registry,accept_token=not os.getenv("PERPLEXITY_API_KEY"),)
app_allenai.py+8-37
app_perplexity.py+1-1