Spaces:
Runtime error
Runtime error
Commit
·
fd50ccf
1
Parent(s):
f3dac4d
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,17 +1,9 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import torch
|
| 3 |
from huggingface_hub import from_pretrained_fastai
|
| 4 |
-
from pathlib import Path
|
| 5 |
|
| 6 |
examples = ["llama.jpg", "alpaca.png"]
|
| 7 |
repo_id = "osanseviero/llama_or_alpaca"
|
| 8 |
-
path = Path("./")
|
| 9 |
-
|
| 10 |
-
def get_y(r):
|
| 11 |
-
return r["label"]
|
| 12 |
-
|
| 13 |
-
def get_x(r):
|
| 14 |
-
return path/r["fname"]
|
| 15 |
|
| 16 |
learner = from_pretrained_fastai(repo_id)
|
| 17 |
labels = learner.dls.vocab
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import torch
|
| 3 |
from huggingface_hub import from_pretrained_fastai
|
|
|
|
| 4 |
|
| 5 |
examples = ["llama.jpg", "alpaca.png"]
|
| 6 |
repo_id = "osanseviero/llama_or_alpaca"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
learner = from_pretrained_fastai(repo_id)
|
| 9 |
labels = learner.dls.vocab
|