vislupus commited on
Commit
ca660d3
1 Parent(s): 434e016

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -6
app.py CHANGED
@@ -46,9 +46,14 @@ def rag_retriever(message, history, system_prompt, num_sources=4, temperature=0)
46
 
47
 
48
  rag = gr.ChatInterface(rag_retriever,
49
- # examples=[["Каква е целта на настоящия регламент", "You are an expert assistant in Bulgarian regulations. Provide precise and clear answers. Provide a detailed and comprehensive answer, incorporating as much relevant information as possible. Always respond in Bulgarian, regardless of the language used in the question."],
50
- # ["Какво са Системите с ИИ", "You are an expert assistant in Bulgarian regulations. Provide precise and clear answers. Always respond in Bulgarian, regardless of the language used in the question."],
51
- # ["Какво е равнище на технологично развитие", "You are an expert assistant in Bulgarian regulations. Provide precise and clear answers. Always respond in Bulgarian, regardless of the language used in the question."]],
 
 
 
 
 
52
  title="Чатене с документа AI Act",
53
  description="Питайте каквото пожелаете, но пишете на български.",
54
  chatbot=gr.Chatbot(placeholder="<strong>Вашият личен AI Act помощник</strong><br>Питайте каквото пожелаете, но пишете на български."),
@@ -57,9 +62,11 @@ rag = gr.ChatInterface(rag_retriever,
57
  undo_btn="Назад",
58
  clear_btn="Изчистете",
59
  submit_btn="Изпрати",
60
- additional_inputs=[gr.components.Textbox("You are an expert assistant in Bulgarian regulations. Provide precise and clear answers. Always respond in Bulgarian, regardless of the language used in the question.", label="System Prompt"),
61
- gr.components.Slider(minimum=1, maximum=10, value=4, step=1, label="Брой препратки"),
62
- gr.components.Slider(minimum=0, maximum=2, value=0, label="Креативност на модела", info="Ако е много високо моделът си измисля, но може да напише интересни неща."),],
 
 
63
  additional_inputs_accordion=gr.Accordion("Допълнителни настройки", open=False),
64
  )
65
 
 
46
 
47
 
48
  rag = gr.ChatInterface(rag_retriever,
49
+ examples=[
50
+ ["Каква е целта на настоящия регламент",
51
+ "You are an expert assistant in Bulgarian regulations. Provide precise and clear answers. Provide a detailed and comprehensive answer, incorporating as much relevant information as possible. Always respond in Bulgarian, regardless of the language used in the question."],
52
+ ["Какво са Системите с ИИ",
53
+ "You are an expert assistant in Bulgarian regulations. Provide precise and clear answers. Always respond in Bulgarian, regardless of the language used in the question."],
54
+ ["Какво е равнище на технологично развитие",
55
+ "You are an expert assistant in Bulgarian regulations. Provide precise and clear answers. Always respond in Bulgarian, regardless of the language used in the question."]
56
+ ],
57
  title="Чатене с документа AI Act",
58
  description="Питайте каквото пожелаете, но пишете на български.",
59
  chatbot=gr.Chatbot(placeholder="<strong>Вашият личен AI Act помощник</strong><br>Питайте каквото пожелаете, но пишете на български."),
 
62
  undo_btn="Назад",
63
  clear_btn="Изчистете",
64
  submit_btn="Изпрати",
65
+ additional_inputs=[
66
+ gr.Textbox(value="You are an expert assistant in Bulgarian regulations. Provide precise and clear answers. Always respond in Bulgarian, regardless of the language used in the question.", label="System Prompt"),
67
+ gr.Slider(minimum=1, maximum=10, value=4, step=1, label="Брой препратки"),
68
+ gr.Slider(minimum=0, maximum=2, value=0, label="Креативност на модела", info="Ако е много високо моделът си измисля, но може да напише интересни неща.")
69
+ ],
70
  additional_inputs_accordion=gr.Accordion("Допълнителни настройки", open=False),
71
  )
72