xinjie.wang commited on
Commit
cac4e12
·
1 Parent(s): c64341f

Add application file

Browse files
Files changed (2) hide show
  1. app.py +2 -0
  2. requirements.txt +1 -1
app.py CHANGED
@@ -11,9 +11,11 @@ def pinfo():
11
  zero = torch.Tensor([0]).cuda()
12
  print(zero.device)
13
 
 
14
  def my_function(input_text):
15
  pinfo()
16
  return f"Received: {input_text}"
17
 
 
18
  iface = gr.Interface(fn=my_function, inputs="text", outputs="text")
19
  iface.launch()
 
11
  zero = torch.Tensor([0]).cuda()
12
  print(zero.device)
13
 
14
+
15
  def my_function(input_text):
16
  pinfo()
17
  return f"Received: {input_text}"
18
 
19
+
20
  iface = gr.Interface(fn=my_function, inputs="text", outputs="text")
21
  iface.launch()
requirements.txt CHANGED
@@ -1,3 +1,3 @@
1
  --extra-index-url https://download.pytorch.org/whl/cu121
2
 
3
- torch==2.4.0
 
1
  --extra-index-url https://download.pytorch.org/whl/cu121
2
 
3
+ torch==2.1.0+cu118