Commit
·
c8eb842
1
Parent(s):
411ce45
gradio
Browse files- Dockerfile +4 -2
- app.py +6 -0
- main.py +0 -1
- requirements.txt +2 -1
Dockerfile
CHANGED
@@ -24,5 +24,7 @@ RUN chmod +x /usr/local/bin/sft
|
|
24 |
# Optional: set entrypoint to sft
|
25 |
ENTRYPOINT ["sft"]
|
26 |
|
27 |
-
#
|
28 |
-
|
|
|
|
|
|
24 |
# Optional: set entrypoint to sft
|
25 |
ENTRYPOINT ["sft"]
|
26 |
|
27 |
+
# Launch the application
|
28 |
+
EXPOSE 7860
|
29 |
+
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
30 |
+
CMD ["python", "app.py"]
|
app.py
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def greet(name):
|
4 |
+
return f"Hello {name}!"
|
5 |
+
|
6 |
+
iface = gr.Interface(fn=greet, inputs="text", outputs="text").launch()
|
main.py
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
print("This is main!")
|
|
|
|
requirements.txt
CHANGED
@@ -1 +1,2 @@
|
|
1 |
-
git+https://github.com/huggingface/trl.git@main#egg=trl
|
|
|
|
1 |
+
git+https://github.com/huggingface/trl.git@main#egg=trl
|
2 |
+
gradio
|