Shanshan Wang commited on
Commit
1e447a3
1 Parent(s): 471e971

updated app

Browse files
Files changed (1) hide show
  1. app.py +1 -10
app.py CHANGED
@@ -4,13 +4,6 @@ from transformers import AutoModel, AutoTokenizer, AutoImageProcessor
4
  import torch
5
  import torchvision.transforms as T
6
  from PIL import Image
7
- import time
8
- import os, sys
9
- import json
10
- import re
11
- from tqdm import tqdm
12
-
13
- import pandas as pd
14
 
15
  from torchvision.transforms.functional import InterpolationMode
16
  # Define the path to your model
@@ -20,8 +13,6 @@ path = 'h2oai/h2o-mississippi-2b'
20
  IMAGENET_MEAN = (0.485, 0.456, 0.406)
21
  IMAGENET_STD = (0.229, 0.224, 0.225)
22
 
23
- start_pre = time.time()
24
-
25
  def build_transform(input_size):
26
  MEAN, STD = IMAGENET_MEAN, IMAGENET_STD
27
  transform = T.Compose([
@@ -235,4 +226,4 @@ with gr.Blocks() as demo:
235
  outputs=[image_input, prompt_input, response_output]
236
  )
237
 
238
- demo.launch(share=True)
 
4
  import torch
5
  import torchvision.transforms as T
6
  from PIL import Image
 
 
 
 
 
 
 
7
 
8
  from torchvision.transforms.functional import InterpolationMode
9
  # Define the path to your model
 
13
  IMAGENET_MEAN = (0.485, 0.456, 0.406)
14
  IMAGENET_STD = (0.229, 0.224, 0.225)
15
 
 
 
16
  def build_transform(input_size):
17
  MEAN, STD = IMAGENET_MEAN, IMAGENET_STD
18
  transform = T.Compose([
 
226
  outputs=[image_input, prompt_input, response_output]
227
  )
228
 
229
+ demo.launch()