shoom013 commited on
Commit
531375b
·
verified ·
1 Parent(s): 4e5bbba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -26,7 +26,8 @@ last = 0
26
  CHROMA_DATA_PATH = "chroma_data/"
27
  EMBED_MODEL = "sentence-transformers/all-MiniLM-L6-v2" # "BAAI/bge-m3"
28
  #LLM_NAME = "mistralai/Mistral-Nemo-Instruct-2407"
29
- LLM_NAME = "swiss-ai/Apertus-8B-Instruct-2509" # provider: publicai
 
30
  #LLM_NAME = "W4D/YugoGPT-7B-Instruct-GGUF"
31
  CHUNK_SIZE = 800
32
  CHUNK_OVERLAP = 50
@@ -182,7 +183,7 @@ def rag(input_text, history, jezik, file):
182
  # outputs=[gr.Textbox(label="Odgovor:", lines=6)],
183
  # ChatMessage(role="assistant", content="Kako Vam mogu pomoći?")
184
  with gr.Blocks() as iface:
185
- ichat = gr.ChatInterface(rag,
186
  title="UChat",
187
  description="Postavite pitanje ili opišite problem koji imate - nakon promene jezika ili pre početka nove sesije sa agentom pritisnite dugme 'Briši sve - razgovor ispočetka'",
188
  chatbot=gr.Chatbot(placeholder="Kako Vam mogu pomoći?", type="tuples", label="Agent podrške", height=350),
@@ -205,6 +206,7 @@ with gr.Blocks() as iface:
205
  ],
206
  additional_inputs_accordion="Jezik i ostale opcije",
207
  )
 
208
  ichat.clear_btn.click(resetChat)
209
 
210
  #with gr.Blocks() as iface:
 
26
  CHROMA_DATA_PATH = "chroma_data/"
27
  EMBED_MODEL = "sentence-transformers/all-MiniLM-L6-v2" # "BAAI/bge-m3"
28
  #LLM_NAME = "mistralai/Mistral-Nemo-Instruct-2407"
29
+ #LLM_NAME = "swiss-ai/Apertus-8B-Instruct-2509" # provider: publicai
30
+ LLM_NAME = "openai/gpt-oss-20b"
31
  #LLM_NAME = "W4D/YugoGPT-7B-Instruct-GGUF"
32
  CHUNK_SIZE = 800
33
  CHUNK_OVERLAP = 50
 
183
  # outputs=[gr.Textbox(label="Odgovor:", lines=6)],
184
  # ChatMessage(role="assistant", content="Kako Vam mogu pomoći?")
185
  with gr.Blocks() as iface:
186
+ ichat = gr.ChatInterface(fn=rag,
187
  title="UChat",
188
  description="Postavite pitanje ili opišite problem koji imate - nakon promene jezika ili pre početka nove sesije sa agentom pritisnite dugme 'Briši sve - razgovor ispočetka'",
189
  chatbot=gr.Chatbot(placeholder="Kako Vam mogu pomoći?", type="tuples", label="Agent podrške", height=350),
 
206
  ],
207
  additional_inputs_accordion="Jezik i ostale opcije",
208
  )
209
+ login_button = gr.LoginButton("Hugging Face login", size="lg")
210
  ichat.clear_btn.click(resetChat)
211
 
212
  #with gr.Blocks() as iface: