replace theme
Build-Deploy-Actions
Details
Build-Deploy-Actions
Details
This commit is contained in:
parent
b93b9dba15
commit
b6ffc33c64
11
app.py
11
app.py
|
@ -2,6 +2,15 @@ from PIL import Image
|
|||
import gradio as gr
|
||||
from transformers import ViTFeatureExtractor, ViTForImageClassification
|
||||
import torch
|
||||
from gradio.themes.utils import sizes
|
||||
theme = gr.themes.Default(radius_size=sizes.radius_none).set(
|
||||
block_label_text_color = '#4D63FF',
|
||||
block_title_text_color = '#4D63FF',
|
||||
button_primary_text_color = '#4D63FF',
|
||||
button_primary_background_fill='#FFFFFF',
|
||||
button_primary_border_color='#4D63FF',
|
||||
button_primary_background_fill_hover='#EDEFFF',
|
||||
)
|
||||
|
||||
# Init model, transforms
|
||||
model = ViTForImageClassification.from_pretrained('nateraw/vit-age-classifier')
|
||||
|
@ -43,5 +52,5 @@ gr.Interface(
|
|||
description=description,
|
||||
article=article,
|
||||
examples=examples,
|
||||
theme="huggingface",
|
||||
theme=theme,
|
||||
).launch(debug=True, enable_queue=True)
|
||||
|
|
Loading…
Reference in New Issue