yourusername commited on
Commit
fa007b1
1 Parent(s): 0975c59

:construction: wip

Browse files
Files changed (1) hide show
  1. app.py +13 -11
app.py CHANGED
@@ -1,15 +1,5 @@
1
- import gc
2
- import math
3
  import sys
4
  from subprocess import call
5
-
6
- import numpy as np
7
- import torch
8
- from encoded_video import EncodedVideo, write_video
9
- from PIL import Image
10
- from torchvision.transforms.functional import center_crop, to_tensor
11
-
12
-
13
  def run_cmd(command):
14
  try:
15
  print(command)
@@ -18,11 +8,23 @@ def run_cmd(command):
18
  print("Process interrupted")
19
  sys.exit(1)
20
 
21
-
22
  print("⬇️ Installing latest gradio==2.4.7b0")
23
  run_cmd("pip install --upgrade pip")
24
  run_cmd('pip install "gradio==2.4.7b0"')
 
 
 
 
 
25
  import gradio as gr
 
 
 
 
 
 
 
 
26
 
27
  print("🧠 Loading Model...")
28
  model = torch.hub.load(
 
 
 
1
  import sys
2
  from subprocess import call
 
 
 
 
 
 
 
 
3
  def run_cmd(command):
4
  try:
5
  print(command)
 
8
  print("Process interrupted")
9
  sys.exit(1)
10
 
 
11
  print("⬇️ Installing latest gradio==2.4.7b0")
12
  run_cmd("pip install --upgrade pip")
13
  run_cmd('pip install "gradio==2.4.7b0"')
14
+
15
+ import gc
16
+ import math
17
+
18
+
19
  import gradio as gr
20
+ import numpy as np
21
+ import torch
22
+ from encoded_video import EncodedVideo, write_video
23
+ from PIL import Image
24
+ from torchvision.transforms.functional import center_crop, to_tensor
25
+
26
+
27
+
28
 
29
  print("🧠 Loading Model...")
30
  model = torch.hub.load(