Spaces:
Runtime error
Runtime error
omerXfaruq
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,13 @@ from transformers import AutoFeatureExtractor, AutoModel
|
|
7 |
|
8 |
index = Index.from_env()
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
# Data transformation chain.
|
11 |
transformation_chain = T.Compose(
|
12 |
[
|
@@ -17,12 +24,6 @@ transformation_chain = T.Compose(
|
|
17 |
]
|
18 |
)
|
19 |
|
20 |
-
model_ckpt = "google/vit-base-patch16-224-in21k"
|
21 |
-
extractor = AutoFeatureExtractor.from_pretrained(model_ckpt)
|
22 |
-
model = AutoModel.from_pretrained(model_ckpt)
|
23 |
-
hidden_dim = model.config.hidden_size
|
24 |
-
dataset = load_dataset("BounharAbdelaziz/Face-Aging-Dataset")
|
25 |
-
|
26 |
with gr.Blocks() as demo:
|
27 |
gr.Markdown(
|
28 |
"""
|
|
|
7 |
|
8 |
index = Index.from_env()
|
9 |
|
10 |
+
|
11 |
+
model_ckpt = "google/vit-base-patch16-224-in21k"
|
12 |
+
extractor = AutoFeatureExtractor.from_pretrained(model_ckpt)
|
13 |
+
model = AutoModel.from_pretrained(model_ckpt)
|
14 |
+
hidden_dim = model.config.hidden_size
|
15 |
+
dataset = load_dataset("BounharAbdelaziz/Face-Aging-Dataset")
|
16 |
+
|
17 |
# Data transformation chain.
|
18 |
transformation_chain = T.Compose(
|
19 |
[
|
|
|
24 |
]
|
25 |
)
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
with gr.Blocks() as demo:
|
28 |
gr.Markdown(
|
29 |
"""
|