Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 536 Bytes
5ea344f bb2a7e9 5ea344f bb2a7e9 2201358 bb2a7e9 2201358 5ea344f bb2a7e9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import gradio as gr
import spaces
import transformers_gradio
# Load Llama model
demo = gr.load(name="allenai/Llama-3.1-Tulu-3-8B", src=transformers_gradio.registry)
demo.fn = spaces.GPU()(demo.fn)
# Load OLMo model
olmo_demo = gr.load(name="akhaliq/olmo-anychat")
# Disable API names for both demos
for fn in demo.fns.values():
fn.api_name = False
for fn in olmo_demo.fns.values():
fn.api_name = False
if __name__ == "__main__":
# Launch both demos
gr.TabbedInterface([demo, olmo_demo], ["Llama", "OLMo"]).launch()
|