rafaldembski commited on
Commit
8389500
1 Parent(s): e193a62

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -12
app.py CHANGED
@@ -165,25 +165,30 @@ Analyze the user's emotions based on their language and tone. If the user seems
165
  Always aim to improve. After every interaction, evaluate whether the answer could be refined or if additional information might be necessary to fully address the user’s request.
166
  """
167
 
168
- with gr.Blocks() as demo:
169
- gr.Markdown("# Llama3.1-Instruct-O1")
170
- gr.Markdown("[Powered by SambaNova Cloud, Get Your API Key Here](https://cloud.sambanova.ai/apis)")
171
 
172
- with gr.Row():
173
- api_key = gr.Textbox(label="API Key", type="password", placeholder="(Optional) Enter your API key here for more availability")
 
 
 
 
174
 
175
  with gr.Row():
176
- model = gr.Dropdown(choices=MODELS, label="Select Model", value=MODELS[0])
177
- thinking_budget = gr.Slider(minimum=1, maximum=100, value=10, step=1, label="Thinking Budget", info="maximum times a model can think")
178
 
179
  chatbot = gr.Chatbot(label="Chat", show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel", type="messages")
180
 
181
- msg = gr.Textbox(label="Type your message here...", placeholder="Enter your message...")
182
 
183
- gr.Button("Clear Chat").click(lambda: ([], ""), inputs=None, outputs=[chatbot, msg])
 
184
 
185
- system_prompt = gr.Textbox(label="System Prompt", value=DEFAULT_SYSTEM_PROMPT, lines=15, interactive=True)
186
 
187
- msg.submit(generate, inputs=[msg, chatbot, model, system_prompt, thinking_budget, api_key], outputs=[chatbot, msg])
 
 
188
 
189
- demo.launch(share=True, show_api=False)
 
165
  Always aim to improve. After every interaction, evaluate whether the answer could be refined or if additional information might be necessary to fully address the user’s request.
166
  """
167
 
168
+ # Now, let's simplify the interface and remove unnecessary boxes like API Key and System Prompt
 
 
169
 
170
+ with gr.Blocks() as demo:
171
+ # New header and description for D-LOGIC
172
+ gr.Markdown("# D-LOGIC: Twój Inteligentny Asystent AI")
173
+ gr.Markdown("""
174
+ **D-LOGIC** to zaawansowany asystent AI stworzony przez Rafała Dembskiego. Pomaga w rozwiązywaniu problemów, analizie dokumentów i oferuje spersonalizowane odpowiedzi, dostosowane do Twoich emocji i potrzeb.
175
+ """)
176
 
177
  with gr.Row():
178
+ model = gr.Dropdown(choices=MODELS, label="Wybierz Model", value=MODELS[0])
179
+ thinking_budget = gr.Slider(minimum=1, maximum=100, value=10, step=1, label="Budżet Myślenia", info="Maksymalna liczba kroków, które model może przemyśleć")
180
 
181
  chatbot = gr.Chatbot(label="Chat", show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel", type="messages")
182
 
183
+ msg = gr.Textbox(label="Wpisz swoją wiadomość...", placeholder="Wprowadź swoją wiadomość...")
184
 
185
+ submit_button = gr.Button("Wyślij")
186
+ clear_button = gr.Button("Wyczyść Chat")
187
 
188
+ clear_button.click(lambda: ([], ""), inputs=None, outputs=[chatbot, msg])
189
 
190
+ # Submit messages by pressing Enter or clicking the Submit button
191
+ msg.submit(generate, inputs=[msg, chatbot, model, DEFAULT_SYSTEM_PROMPT, thinking_budget, None], outputs=[chatbot, msg])
192
+ submit_button.click(generate, inputs=[msg, chatbot, model, DEFAULT_SYSTEM_PROMPT, thinking_budget, None], outputs=[chatbot, msg])
193
 
194
+ demo.launch(share=True, show_api=False)