ramshashaikh commited on
Commit ·
1f69a30
1
Parent(s): 48b2c9b
added scrolable component
Browse files- app.py → main.py +6 -2
- requirements.txt +0 -0
app.py → main.py
RENAMED
|
@@ -115,7 +115,6 @@ try:
|
|
| 115 |
# "max_tokens": 300,
|
| 116 |
# "model": "text-davinci-003",
|
| 117 |
# }
|
| 118 |
-
|
| 119 |
response = openai.ChatCompletion.create(
|
| 120 |
model="gpt-3.5-turbo",
|
| 121 |
messages=[
|
|
@@ -129,7 +128,12 @@ try:
|
|
| 129 |
|
| 130 |
# Displaying the answer to the user
|
| 131 |
# print(response['choices'][0].message.content)
|
| 132 |
-
st.write(textwrap.fill(response['choices'][0].message.content))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
except Exception as e:
|
| 134 |
print(e)
|
| 135 |
st.warning("Something went wrong. Please try again.")
|
|
|
|
| 115 |
# "max_tokens": 300,
|
| 116 |
# "model": "text-davinci-003",
|
| 117 |
# }
|
|
|
|
| 118 |
response = openai.ChatCompletion.create(
|
| 119 |
model="gpt-3.5-turbo",
|
| 120 |
messages=[
|
|
|
|
| 128 |
|
| 129 |
# Displaying the answer to the user
|
| 130 |
# print(response['choices'][0].message.content)
|
| 131 |
+
# st.write(textwrap.fill(response['choices'][0].message.content))
|
| 132 |
+
import streamlit_scrollable_textbox as stx
|
| 133 |
+
|
| 134 |
+
long_text = response['choices'][0].message.content
|
| 135 |
+
stx.scrollableTextbox(long_text, height=300)
|
| 136 |
+
|
| 137 |
except Exception as e:
|
| 138 |
print(e)
|
| 139 |
st.warning("Something went wrong. Please try again.")
|
requirements.txt
CHANGED
|
Binary files a/requirements.txt and b/requirements.txt differ
|
|
|