Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- Dockerfile +2 -2
- app.py +4 -14
- requirements.txt +1 -1
Dockerfile
CHANGED
|
@@ -12,5 +12,5 @@ COPY . /app
|
|
| 12 |
|
| 13 |
EXPOSE 7860
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
CMD ["
|
|
|
|
| 12 |
|
| 13 |
EXPOSE 7860
|
| 14 |
|
| 15 |
+
# CMD for Streamlit application
|
| 16 |
+
CMD ["streamlit", "run", "app.py", "--server.port", "7860", "--server.address", "0.0.0.0"]
|
app.py
CHANGED
|
@@ -1,19 +1,9 @@
|
|
| 1 |
-
import
|
| 2 |
-
import time
|
| 3 |
import os
|
| 4 |
|
| 5 |
os.environ["HF_HOME"] = "/tmp/huggingface"
|
| 6 |
os.makedirs("/tmp/huggingface", exist_ok=True)
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
time.sleep(1)
|
| 12 |
-
return "Hello " + name + "!"
|
| 13 |
-
|
| 14 |
-
iface = gr.Interface(fn=greet, inputs="text", outputs="text", title="Minimal Gradio App")
|
| 15 |
-
|
| 16 |
-
if __name__ == "__main__":
|
| 17 |
-
print("INFO: Attempting to launch simple Gradio app.")
|
| 18 |
-
iface.queue().launch(share=True)
|
| 19 |
-
print("INFO: Simple Gradio app launch command executed.")
|
|
|
|
| 1 |
+
import streamlit as st
|
|
|
|
| 2 |
import os
|
| 3 |
|
| 4 |
os.environ["HF_HOME"] = "/tmp/huggingface"
|
| 5 |
os.makedirs("/tmp/huggingface", exist_ok=True)
|
| 6 |
|
| 7 |
+
st.title("Minimal Streamlit App")
|
| 8 |
+
st.write("INFO: Minimal Streamlit App Started.")
|
| 9 |
+
st.write("Hello from Streamlit!")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
|
| 2 |
-
|
|
|
|
| 1 |
|
| 2 |
+
streamlit
|