Spaces:
Running
Running
Update app.py
Browse filesUpdated help. 'solve' and 'puzzle' case insensitive.
app.py
CHANGED
@@ -265,10 +265,10 @@ def chat(prompt, user_window, pwd_window, past, response, gptModel, uploaded_ima
|
|
265 |
if user_window in unames and pwd_window == pwdList[unames.index(user_window)]:
|
266 |
chatType = 'normal'
|
267 |
prompt = prompt.strip()
|
268 |
-
if prompt.startswith('solve'):
|
269 |
prompt = 'How do I solve ' + prompt[5:] + ' Do not use Latex for math expressions.'
|
270 |
chatType = 'math'
|
271 |
-
elif prompt.startswith('puzzle'):
|
272 |
chatType = 'logic'
|
273 |
prompt = prompt[6:]
|
274 |
past.append({"role":"user", "content":prompt})
|
@@ -453,22 +453,27 @@ def make_image(prompt, user, pwd):
|
|
453 |
|
454 |
def show_help():
|
455 |
return '''
|
456 |
-
1.
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
|
|
464 |
entry "Reset Voice Entry" button to enable additional voice entry. Then tap "Submit Prompt/Question".
|
465 |
-
|
466 |
-
|
|
|
|
|
|
|
|
|
467 |
4.1 Enter description of desired image in prompt window via either typing or voice entry
|
468 |
4.2 Tap the "Make Image" button. This can take a few seconds.
|
469 |
4.3 There is a download button on the image display if your system supports file downloads.
|
470 |
4.4 When done viewing image, tap the "Restart Conversation" button
|
471 |
-
5.
|
472 |
5.1 Enter what you want to know about the image in the prompt window. You can include instructions
|
473 |
to write a poem about something in the image, for example. Or just say "what's in this image?"
|
474 |
5.2 Tap the "Upload Image to Analyze" button.
|
|
|
265 |
if user_window in unames and pwd_window == pwdList[unames.index(user_window)]:
|
266 |
chatType = 'normal'
|
267 |
prompt = prompt.strip()
|
268 |
+
if prompt.lower().startswith('solve'):
|
269 |
prompt = 'How do I solve ' + prompt[5:] + ' Do not use Latex for math expressions.'
|
270 |
chatType = 'math'
|
271 |
+
elif prompt.lower().startswith('puzzle'):
|
272 |
chatType = 'logic'
|
273 |
prompt = prompt[6:]
|
274 |
past.append({"role":"user", "content":prompt})
|
|
|
453 |
|
454 |
def show_help():
|
455 |
return '''
|
456 |
+
1. Gemeral:
|
457 |
+
1.1 Login with user name and password (not case-sensitive)
|
458 |
+
1.2 Type prompts (questions, instructions) into "Prompt or Question" window (OR) you can speak prompts by
|
459 |
+
tapping the audio "Record" button, saying your prompt, then tapping the "Stop" button.
|
460 |
+
Your prompt will appear in the Prompt window, and you can edit it there if needed.
|
461 |
+
1.3 Text in the "Dialog" window can be spoken by tapping the "Speak Dialog" button.
|
462 |
+
2. Chat:
|
463 |
+
2.1 Enter prompt and tap the "Submit Prompt/Question" button. The responses appear in the Dialog window.
|
464 |
+
2.2 Enter follow-up questions in the Prompt window either by typing or speaking. Tap the voice
|
465 |
entry "Reset Voice Entry" button to enable additional voice entry. Then tap "Submit Prompt/Question".
|
466 |
+
2.3 If topic changes or when done chatting, tap the "Restart Conversation" button.
|
467 |
+
3. Solve math equations or logic problems providing step-by-step analysis:
|
468 |
+
3.1 Math: Make "solve" the first word in your prompt, followed by the equation, e.g., x^2 - x + 1 = 0
|
469 |
+
3.2 Logic: Make "puzzle" the first word in your prompt, followed by a detailed description of a logic
|
470 |
+
problem with the answer(s) you desire.
|
471 |
+
4. Make Image:
|
472 |
4.1 Enter description of desired image in prompt window via either typing or voice entry
|
473 |
4.2 Tap the "Make Image" button. This can take a few seconds.
|
474 |
4.3 There is a download button on the image display if your system supports file downloads.
|
475 |
4.4 When done viewing image, tap the "Restart Conversation" button
|
476 |
+
5. Analyze an Image you provide:
|
477 |
5.1 Enter what you want to know about the image in the prompt window. You can include instructions
|
478 |
to write a poem about something in the image, for example. Or just say "what's in this image?"
|
479 |
5.2 Tap the "Upload Image to Analyze" button.
|