ariG23498 HF staff commited on
Commit
29cef8e
β€’
1 Parent(s): fc1cf4b
Files changed (2) hide show
  1. app.py +30 -0
  2. requirements.txt +9 -0
app.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import git
2
+
3
+ git_url = "https://github.com/ariG23498/clip_dinoiser.git"
4
+ repo_dir = "clip_dinoiser"
5
+ git.Repo.clone_from(git_url, repo_dir)
6
+
7
+ import os
8
+ from clip_dinoiser.models.builder import build_model
9
+ from clip_dinoiser.utils.visualization import mask2rgb
10
+ from clip_dinoiser.segmentation.datasets import PascalVOCDataset
11
+
12
+ from hydra import compose, initialize
13
+ from PIL import Image
14
+ import matplotlib.pyplot as plt
15
+ from torchvision import transforms as T
16
+ import torch.nn.functional as F
17
+ import numpy as np
18
+ from operator import itemgetter
19
+ import torch
20
+ import warnings
21
+
22
+ import gradio as gr
23
+
24
+
25
+
26
+ def greet(name):
27
+ return "Hello " + name + "!!"
28
+
29
+ iface = gr.Interface(fn=greet, inputs="text", outputs="text")
30
+ iface.launch()
requirements.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ torch==2.1.0+cu121
2
+ gradio
3
+ gitpython
4
+ ftfy
5
+ omegaconf
6
+ open_clip_torch
7
+ hydra-core
8
+ mmcv==1.3.8
9
+ mmsegmentation==0.14.1