| import gradio as gr |
| from transformers import pipeline |
|
|
| model_yolu = "buketyeter/blood_cell_project" |
|
|
| pipe = pipeline("image-classification", model=model_yolu) |
|
|
| def tahmin_et(resim): |
| sonuclar = pipe(resim) |
| return {sonuc['label']: sonuc['score'] for sonuc in sonuclar} |
|
|
| |
| arayuz = gr.Interface( |
| fn=tahmin_et, |
| inputs=gr.Image(type="pil"), |
| outputs=gr.Label(num_top_classes=3), |
| title="AI Blood Cell Analysis System", |
| description=""" |
| This application is an automated blood cell classification system powered by a fine-tuned **SwinV2 Transformer** architecture. |
| Please upload a microscopic blood cell image to analyze and identify its type. |
| """, |
| theme="default" |
| ) |
|
|
| arayuz.launch() |