File size: 675 Bytes
a8960ed
0d20d60
 
 
 
a8960ed
09cd27a
a8960ed
3b165d3
0d20d60
 
 
 
 
 
 
 
 
3b165d3
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import gradio as gr
import os

# Get the Hugging Face token from the Space's secrets
HF_TOKEN = os.environ.get("HF_TOKEN")

with gr.Blocks(fill_height=True) as demo:
    with gr.Sidebar():
        gr.Markdown("# Inference Provider")
        gr.Markdown("This Space showcases the Orion-zhen/Qwen2.5-7B-Instruct-Uncensored model, served by the featherless-ai API.")
    
    # Use the HF_TOKEN from the environment to authenticate.
    # The LoginButton is removed as it's not compatible with a headless React client.
    gr.load(
        "models/Orion-zhen/Qwen2.5-7B-Instruct-Uncensored",
        hf_token=HF_TOKEN,
        provider="featherless-ai"
    )
    
demo.launch()