chenlin commited on
Commit
1ed128d
1 Parent(s): 1f60c34
Files changed (2) hide show
  1. app.py +0 -2
  2. requirements.txt +2 -5
app.py CHANGED
@@ -1,6 +1,5 @@
1
  import gradio as gr
2
  import torch
3
- import spaces
4
  from PIL import Image
5
  from transformers import AutoModelForCausalLM, AutoTokenizer
6
 
@@ -19,7 +18,6 @@ seg_emb1 = model.encode_text(seg1, add_special_tokens=True)
19
  seg_emb2 = model.encode_text(seg2, add_special_tokens=False)
20
 
21
 
22
- @spaces.GPU(duration=60)
23
  def detailed_caption(img_path):
24
  subs = []
25
  image = Image.open(img_path).convert("RGB")
 
1
  import gradio as gr
2
  import torch
 
3
  from PIL import Image
4
  from transformers import AutoModelForCausalLM, AutoTokenizer
5
 
 
18
  seg_emb2 = model.encode_text(seg2, add_special_tokens=False)
19
 
20
 
 
21
  def detailed_caption(img_path):
22
  subs = []
23
  image = Image.open(img_path).convert("RGB")
requirements.txt CHANGED
@@ -4,13 +4,10 @@ tiktoken==0.5.1
4
  einops==0.7.0
5
  transformers_stream_generator==0.0.4
6
  scipy==1.11.3
7
- torch==2.1.2
8
- torchvision==0.16.2
9
  pillow==10.0.1
10
  matplotlib==3.8.0
11
- gradio==4.16.0
12
- gradio_client==0.8.1
13
  sentencepiece
14
  urllib3==1.26.18
15
  timm==0.6.13
16
- spaces
 
4
  einops==0.7.0
5
  transformers_stream_generator==0.0.4
6
  scipy==1.11.3
7
+ torchvision==0.15.2
 
8
  pillow==10.0.1
9
  matplotlib==3.8.0
10
+ gradio==3.50.2
 
11
  sentencepiece
12
  urllib3==1.26.18
13
  timm==0.6.13