M17idd commited on
Commit
7437313
·
verified ·
1 Parent(s): e72fe69

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -153,6 +153,18 @@ with st.sidebar:
153
  پشتیبانی
154
  </div>
155
  """, unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
156
 
157
  # محتوای اصلی
158
  st.markdown("""
@@ -186,7 +198,7 @@ class TogetherEmbeddings(Embeddings):
186
  @st.cache_resource
187
  def get_pdf_index():
188
  with st.spinner('📄 در حال پردازش فایل PDF...'):
189
- loader = [PyPDFLoader('test12.pdf')]
190
  embeddings = TogetherEmbeddings(
191
  model_name="togethercomputer/m2-bert-80M-8k-retrieval",
192
  api_key="0291f33aee03412a47fa5d8e562e515182dcc5d9aac5a7fb5eefdd1759005979"
 
153
  پشتیبانی
154
  </div>
155
  """, unsafe_allow_html=True)
156
+ st.markdown("""
157
+ <style>
158
+ /* تنظیم سایز سایدبار */
159
+ [data-testid="stSidebar"] {
160
+ width: 220px !important;
161
+ flex-shrink: 0;
162
+ }
163
+ [data-testid="stSidebar"] > div {
164
+ width: 220px !important;
165
+ }
166
+ </style>
167
+ """, unsafe_allow_html=True)
168
 
169
  # محتوای اصلی
170
  st.markdown("""
 
198
  @st.cache_resource
199
  def get_pdf_index():
200
  with st.spinner('📄 در حال پردازش فایل PDF...'):
201
+ loader = [PyPDFLoader('test1.pdf')]
202
  embeddings = TogetherEmbeddings(
203
  model_name="togethercomputer/m2-bert-80M-8k-retrieval",
204
  api_key="0291f33aee03412a47fa5d8e562e515182dcc5d9aac5a7fb5eefdd1759005979"