Spaces:
Running
Running
Download app_allenai.py from akhaliq/anycoder: direct link, hf CLI and curl.
- Browser
- Download file 550 Bytes
-
https://huggingface.co/spaces/akhaliq/anycoder/resolve/de54fe0aeabff98614c4d87f5551f8eeb47a053f/app_allenai.py
- Command line
-
hf download hf://spaces/akhaliq/anycoder@de54fe0aeabff98614c4d87f5551f8eeb47a053f/app_allenai.py
-
curl -L -o app_allenai.py https://huggingface.co/spaces/akhaliq/anycoder/resolve/de54fe0aeabff98614c4d87f5551f8eeb47a053f/app_allenai.py
550 Bytes
| 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", src="spaces") | |
| # 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() | |