Prachidwi commited on
Commit
498eb00
·
verified ·
1 Parent(s): 802a102

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -16
app.py CHANGED
@@ -1,16 +1,4 @@
1
- pip install fastai
2
- from fastai.vision.all import *
3
- import timm
4
- path = untar_data(URLs.PETS)/'images'
5
-
6
- dls = ImageDataLoaders.from_name_func('.',
7
- get_image_files(path), valid_pct=0.2, seed=42,
8
- label_func=RegexLabeller(pat = r'^([^/]+)_\d+'),
9
- item_tfms=Resize(224))
10
- dls.show_batch(max_n=4)
11
- learn = vision_learner(dls, resnet34, metrics=error_rate)
12
- learn.fine_tune(3)
13
- timm.list_models('convnext*')
14
- learn = vision_learner(dls, 'convnext_tiny_in22k', metrics=error_rate).to_fp16()
15
- learn.fine_tune(3)
16
- learn.export('model.pkl')
 
1
+ import gradio as gr
2
+ def greet(name): return f"Hello{name}!"
3
+ gr.Interface(fn=greet, inputs="text", outputs="text").launch()
4
+ import gradio as gr