Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweet generator not working #3

Closed
harikrishnad1997 opened this issue May 30, 2023 · 1 comment
Closed

Tweet generator not working #3

harikrishnad1997 opened this issue May 30, 2023 · 1 comment

Comments

@harikrishnad1997
Copy link

AttributeError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app).
Traceback:
File "/home/appuser/venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 561, in _run_script
self._session_state.on_script_will_rerun(rerun_data.widget_states)
File "/home/appuser/venv/lib/python3.10/site-packages/streamlit/runtime/state/safe_session_state.py", line 68, in on_script_will_rerun
self._state.on_script_will_rerun(latest_widget_states)
File "/home/appuser/venv/lib/python3.10/site-packages/streamlit/runtime/state/session_state.py", line 482, in on_script_will_rerun
self._call_callbacks()
File "/home/appuser/venv/lib/python3.10/site-packages/streamlit/runtime/state/session_state.py", line 495, in _call_callbacks
self._new_widget_state.call_callback(wid)
File "/home/appuser/venv/lib/python3.10/site-packages/streamlit/runtime/state/session_state.py", line 247, in call_callback
callback(*args, **kwargs)
File "/app/tweet/app.py", line 66, in generate_text
openai.complete(prompt, "gpt-3.5-turbo").strip().replace('"', "")

@kinosal
Copy link
Owner

kinosal commented Jul 9, 2023

Thanks for flagging this. Looks like OpenAI did not return anything here which occasionally happens. Please just try again in this case. Such errors should probably be handled. Feel free to add this and open a pull request if you like.

@kinosal kinosal closed this as completed Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants