import gradio as gr import os def create_deepseek_interface(): with gr.Blocks(theme="soft", fill_height=True) as demo: # Header Section gr.Markdown( """ # ๐Ÿค– DeepSeek V3 Inference Interface ### Advanced AI Model Powered by Fireworks AI """ ) # Sidebar with Model Information and Login with gr.Sidebar(): gr.Markdown( """ ## ๐Ÿ”‘ Access Control ### Inference Provider This Space showcases the DeepSeek-V3-0324 model, served by the Fireworks AI API. #### Authentication - Sign in with your Hugging Face account - Secure API access """ ) # Styled Login Button with gr.Row(): button = gr.LoginButton( "Sign In", variant="primary" ) # Model Details Section gr.Markdown( """ ### ๐Ÿ“Š Model Details - **Model**: DeepSeek-V3-0324 - **Provider**: Fireworks AI - **Capabilities**: Advanced Language Understanding """ ) # Main Content Area with gr.Column(): # Placeholder for model interaction chatbot = gr.Chatbot( height=500, placeholder="Model is ready. Please authenticate to begin.", label="DeepSeek V3 Chat" ) with gr.Row(): msg = gr.Textbox( label="Your Message", placeholder="Type your prompt here...", show_label=True ) submit = gr.Button("Send", variant="primary") # Button to clear chat history clear = gr.ClearButton([msg, chatbot], value="๐Ÿงน Clear Conversation") # Load Model with Authentication model = gr.load( "models/deepseek-ai/DeepSeek-V3-0324", accept_token=button, provider="fireworks-ai" ) # Simple interaction setup (placeholder) submit.click( lambda x: x, inputs=msg, outputs=chatbot ) return demo # Launch the interface demo = create_deepseek_interface() demo.launch(debug=True)