Update app.py
Browse files
app.py
CHANGED
@@ -195,6 +195,43 @@ def clear_chat():
|
|
195 |
with gr.Blocks() as demo:
|
196 |
gr.Markdown("## GPT-4.5 Preview Chatbot")
|
197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
# Accordion for explaining hyperparameters
|
199 |
with gr.Accordion("Hyperparameters", open=False):
|
200 |
gr.Markdown("""
|
|
|
195 |
with gr.Blocks() as demo:
|
196 |
gr.Markdown("## GPT-4.5 Preview Chatbot")
|
197 |
|
198 |
+
with gr.Accordion("How to Use This App!", open=False):
|
199 |
+
gr.Markdown("""
|
200 |
+
### Getting Started:
|
201 |
+
1. Enter your OpenAI API key in the field at the top and click "Set API Key"
|
202 |
+
2. Adjust the hyperparameters if needed (Temperature, Top-P, Max Output Tokens)
|
203 |
+
|
204 |
+
### Using the Different Tabs:
|
205 |
+
|
206 |
+
#### Image URL Chat
|
207 |
+
- Paste an image URL in the field
|
208 |
+
- Enter your question about the image
|
209 |
+
- Click "Ask" to get a response
|
210 |
+
|
211 |
+
#### Text Chat
|
212 |
+
- Simply type your query in the text field
|
213 |
+
- Click "Ask" to get a response
|
214 |
+
|
215 |
+
#### Image Chat
|
216 |
+
- Upload an image from your device
|
217 |
+
- Enter your question about the uploaded image
|
218 |
+
- Click "Ask" to get a response
|
219 |
+
|
220 |
+
#### PDF Chat
|
221 |
+
- Upload a PDF document
|
222 |
+
- Ask questions about the PDF content
|
223 |
+
- Click "Ask" to get a response
|
224 |
+
|
225 |
+
#### Voice Chat
|
226 |
+
- **Upload Audio:** Upload an audio file, click "Transcribe Audio", then click "Ask"
|
227 |
+
- **Record Audio:** Record your voice, click "Transcribe Recording", then click "Ask"
|
228 |
+
|
229 |
+
### Tips:
|
230 |
+
- Use the "Clear Chat" button to reset all fields
|
231 |
+
- For more creative responses, try increasing the Temperature
|
232 |
+
- For longer responses, increase the Max Output Tokens
|
233 |
+
""")
|
234 |
+
|
235 |
# Accordion for explaining hyperparameters
|
236 |
with gr.Accordion("Hyperparameters", open=False):
|
237 |
gr.Markdown("""
|