Spaces:
Runtime error
Runtime error
Initial commit for Hugging Face Space
Browse files- Procfile +1 -0
- app.py +8 -0
- frontend.py +8 -0
- requirements.txt +4 -0
Procfile
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
web: python app.py
|
app.py
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from flask import Flask
|
2 |
+
app = Flask(__name__)
|
3 |
+
@app.route("/")
|
4 |
+
def home():
|
5 |
+
return "Hello, Hugging Face Space!"
|
6 |
+
|
7 |
+
if __name__ == "__main__":
|
8 |
+
app.run(host="0.0.0.0", port=7860)
|
frontend.py
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def greet(name):
|
4 |
+
return f"Hello {name}!"
|
5 |
+
|
6 |
+
gui = gr.Interface(fn=greet, inputs="text", outputs="text")
|
7 |
+
|
8 |
+
gui.launch()
|
requirements.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Flask==2.0.2
|
2 |
+
requests==2.26.0
|
3 |
+
gradio==2.4.1
|
4 |
+
huggingface_hub
|