Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ from typing import Iterator
|
|
| 5 |
import os
|
| 6 |
from text_generation import Client
|
| 7 |
|
| 8 |
-
model_id = '
|
| 9 |
|
| 10 |
API_URL = "https://api-inference.huggingface.co/models/" + model_id
|
| 11 |
HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
|
@@ -69,7 +69,13 @@ def generate_image_caption(image_data):
|
|
| 69 |
|
| 70 |
def main():
|
| 71 |
st.markdown('<p style="color:#191970;text-align:center;font-size:30px;">Aiconvert.online img2story</p>', unsafe_allow_html=True)
|
| 72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "png", "jpeg"])
|
| 74 |
|
| 75 |
if uploaded_file is not None:
|
|
|
|
| 5 |
import os
|
| 6 |
from text_generation import Client
|
| 7 |
|
| 8 |
+
model_id = os.environ.get("CODE", None)'
|
| 9 |
|
| 10 |
API_URL = "https://api-inference.huggingface.co/models/" + model_id
|
| 11 |
HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
|
|
|
| 69 |
|
| 70 |
def main():
|
| 71 |
st.markdown('<p style="color:#191970;text-align:center;font-size:30px;">Aiconvert.online img2story</p>', unsafe_allow_html=True)
|
| 72 |
+
hide_streamlit_style = """
|
| 73 |
+
<style>
|
| 74 |
+
#MainMenu {visibility: hidden;}
|
| 75 |
+
footer {visibility: hidden;}
|
| 76 |
+
</style>
|
| 77 |
+
"""
|
| 78 |
+
st.markdown(hide_streamlit_style, unsafe_allow_html=True)
|
| 79 |
uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "png", "jpeg"])
|
| 80 |
|
| 81 |
if uploaded_file is not None:
|