kalpniks commited on
Commit
4e521c2
·
verified ·
1 Parent(s): 0f42f95

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. Dockerfile +2 -2
  2. app.py +4 -14
  3. requirements.txt +1 -1
Dockerfile CHANGED
@@ -12,5 +12,5 @@ COPY . /app
12
 
13
  EXPOSE 7860
14
 
15
- # Revert CMD to run the Python app
16
- CMD ["python", "app.py"]
 
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 gradio as gr
2
- import time
3
  import os
4
 
5
  os.environ["HF_HOME"] = "/tmp/huggingface"
6
  os.makedirs("/tmp/huggingface", exist_ok=True)
7
 
8
- print("INFO: Simple Gradio app starting.")
9
-
10
- def greet(name):
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
- gradio==3.50.2
 
1
 
2
+ streamlit