Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,6 +32,55 @@ st.set_page_config(layout="wide")
|
|
32 |
st.title("World Model")
|
33 |
|
34 |
st.sidebar.title("Upload Image or Take a Picture")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
uploaded_file = st.sidebar.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
|
36 |
|
37 |
if uploaded_file is not None:
|
|
|
32 |
st.title("World Model")
|
33 |
|
34 |
st.sidebar.title("Upload Image or Take a Picture")
|
35 |
+
with st.sidebar.expander("Instructions", expanded=False):
|
36 |
+
st.write("""
|
37 |
+
## Streamlit Image Chatbot App Manual
|
38 |
+
|
39 |
+
Welcome to the Streamlit Image Chatbot App! This manual will guide you through using the app to chat with a bot about your uploaded images.
|
40 |
+
|
41 |
+
### Getting Started
|
42 |
+
|
43 |
+
#### Step 1: Open the App
|
44 |
+
- Open your web browser and go to the URL where the Streamlit app is hosted. This will typically be provided to you by the person who set up the app.
|
45 |
+
|
46 |
+
#### Step 2: Upload an Image
|
47 |
+
1. **Choose an Image:**
|
48 |
+
- Look at the left-hand side of the screen. This area is called the sidebar.
|
49 |
+
- In the sidebar, you will see an option to "Choose an image...". Click on this button.
|
50 |
+
|
51 |
+
2. **Select an Image:**
|
52 |
+
- A file dialog will open. Browse your computer to find an image file (JPG, JPEG, or PNG) you want to upload.
|
53 |
+
- Select the file and click "Open" or "Choose" depending on your operating system.
|
54 |
+
|
55 |
+
3. **View the Uploaded Image:**
|
56 |
+
- Once the image is uploaded, you will see it displayed in the sidebar.
|
57 |
+
|
58 |
+
#### Step 3: Chat with the Bot
|
59 |
+
1. **Ask a Question:**
|
60 |
+
- Look at the main section of the app, to the right of the sidebar.
|
61 |
+
- There will be a text box labeled "Ask a question about the image:". Click inside this text box.
|
62 |
+
|
63 |
+
2. **Type Your Question:**
|
64 |
+
- Type in a question you have about the uploaded image. For example, you could ask, "What is in this picture?" or "Can you describe this image?"
|
65 |
+
|
66 |
+
3. **Submit Your Question:**
|
67 |
+
- Press the Enter key on your keyboard to submit your question.
|
68 |
+
|
69 |
+
4. **View the Response:**
|
70 |
+
- The bot will analyze your question and the image, then provide a response. The conversation will be displayed below the text box.
|
71 |
+
|
72 |
+
#### Step 4: Continue the Conversation
|
73 |
+
- You can continue asking more questions about the same image. Each time you ask a question, the bot will respond and the conversation will be updated.
|
74 |
+
|
75 |
+
#### Step 5: Upload a New Image (Optional)
|
76 |
+
- If you want to start a new conversation with a different image, simply go back to the sidebar and upload a new image. The bot will reset with the new image context, and you can start asking questions about the new image.
|
77 |
+
|
78 |
+
### Tips for Best Results
|
79 |
+
- Use clear and specific questions to get the best responses from the bot.
|
80 |
+
- Ensure your images are clear and in good quality to help the bot analyze them accurately.
|
81 |
+
|
82 |
+
Enjoy exploring and interacting with the Streamlit Image Chatbot App!
|
83 |
+
""")
|
84 |
uploaded_file = st.sidebar.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
|
85 |
|
86 |
if uploaded_file is not None:
|