Spaces:
Sleeping
Sleeping
File size: 794 Bytes
258ba22 ca06a2f 258ba22 ca06a2f 258ba22 |
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
def process_file(file):
# Process the uploaded file here
# For demonstration, we'll just return the file name
return f"Uploaded file: {file.name}"
with gr.Blocks(fill_height=True) as demo:
with gr.Sidebar():
gr.Markdown("# Inference Provider")
gr.Markdown("This Space showcases the microsoft/phi-4 model, served by the nebius API. Sign in with your Hugging Face account to use this API.")
button = gr.LoginButton("Sign in")
with gr.Column():
gr.load("models/microsoft/phi-4", accept_token=button, provider="nebius")
file_input = gr.File(label="Upload a file")
file_output = gr.Textbox(label="File Info")
file_input.change(process_file, inputs=file_input, outputs=file_output)
demo.launch() |