robmarkcole commited on
Commit
9e937b6
1 Parent(s): 485b759

Add hello example

Browse files
Files changed (4) hide show
  1. .gitignore +1 -0
  2. README.md +8 -1
  3. app.py +9 -0
  4. requirements.txt +1 -0
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ venv
README.md CHANGED
@@ -12,4 +12,11 @@ license: apache-2.0
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
14
 
15
- Hello world
 
 
 
 
 
 
 
 
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
14
 
15
+ Hello world
16
+
17
+ # Local dev
18
+ python3 -m venv venv
19
+ source venv/bin/activate
20
+ (venv) $ pip install -r requirements.txt
21
+ (venv) $ gradio app.y
22
+ Go to http://127.0.0.1:7860/
app.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
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
+
8
+ if __name__ == "__main__":
9
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ gradio