Moibe commited on
Commit
ced9582
1 Parent(s): f1a3cbd

Add comand line reader

Browse files
Files changed (3) hide show
  1. app.py +10 -0
  2. hola.py +1 -0
  3. runner.py +11 -0
app.py CHANGED
@@ -1,5 +1,7 @@
1
  import gradio as gr
2
  from PIL import Image
 
 
3
 
4
  def greet(input1, input2):
5
  print("Imprimiendo en Consola")
@@ -26,6 +28,14 @@ def greet(input1, input2):
26
  # print("source_path: ", source_path)
27
  # print("target_path: ", target_path)
28
 
 
 
 
 
 
 
 
 
29
 
30
  return input2
31
 
 
1
  import gradio as gr
2
  from PIL import Image
3
+ import time
4
+ import os
5
 
6
  def greet(input1, input2):
7
  print("Imprimiendo en Consola")
 
28
  # print("source_path: ", source_path)
29
  # print("target_path: ", target_path)
30
 
31
+ command = "python hola.py"
32
+ print(command)
33
+ time.sleep(1)
34
+ proc = os.popen(command)
35
+ output = proc.read()
36
+
37
+ print(output)
38
+
39
 
40
  return input2
41
 
hola.py ADDED
@@ -0,0 +1 @@
 
 
1
+ print("Hola desde Hola.py")
runner.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import time
3
+
4
+ #command = "python run.py -s D:/Esyle-Prod/fotos/irina.jpg -t D:/Briefcase/wow.jpg -o D:/Esyle-Prod/resultados/irina-wow.jpg --frame-processor face_swapper"
5
+ command = "python hola.py"
6
+ print(command)
7
+ time.sleep(1)
8
+ proc = os.popen(command)
9
+ output = proc.read()
10
+
11
+ print(output)