chenxie95 commited on
Commit
4700a9f
·
1 Parent(s): 4b6bd51
Files changed (2) hide show
  1. demo/app.py +2 -1
  2. requirements.txt +1 -0
demo/app.py CHANGED
@@ -1,7 +1,8 @@
1
  import gradio as gr
 
2
 
3
  def greet(name):
4
- return "Hello " + name + "!!"
5
 
6
  demo = gr.Interface(fn=greet, inputs="text", outputs="text")
7
  demo.launch()
 
1
  import gradio as gr
2
+ import torch
3
 
4
  def greet(name):
5
+ return f"Hello {name}!! Torch is {torch.__version__}. Cuda is available: {torch.cuda.is_available()}"
6
 
7
  demo = gr.Interface(fn=greet, inputs="text", outputs="text")
8
  demo.launch()
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ torch