ErNewdev0 commited on
Commit
491889c
Β·
verified Β·
1 Parent(s): 8431a42

fix: fuxes atribute error in gradio

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -295,7 +295,7 @@ def create_ui():
295
  .gr-form {
296
  flex-direction: column !important;
297
  }
298
- .gr-box {
299
  margin: 0.5rem 0 !important;
300
  }
301
  }
@@ -311,7 +311,7 @@ def create_ui():
311
  """)
312
 
313
  with gr.Tabs() as tabs:
314
- with gr.TabItem("πŸ› οΈ Konfigurasi", elem_classes="mobile-full"):
315
  provider = gr.Radio(
316
  choices=[AIProvider.XAI, AIProvider.GEMINI, AIProvider.OLLAMA],
317
  label="Penyedia AI",
@@ -321,7 +321,7 @@ def create_ui():
321
  )
322
 
323
  with gr.Group() as api_settings:
324
- with gr.Box():
325
  with gr.Row():
326
  xai_key = gr.Textbox(
327
  label="X.AI (Grok) API Key",
@@ -333,7 +333,7 @@ def create_ui():
333
  with gr.Column(scale=1):
334
  gr.Markdown(XAI_API_HELP)
335
 
336
- with gr.Box():
337
  with gr.Row():
338
  gemini_key = gr.Textbox(
339
  label="Gemini API Key",
@@ -355,8 +355,8 @@ def create_ui():
355
  elem_classes="mobile-full"
356
  )
357
 
358
- with gr.TabItem("πŸ“Š Analisis Repository", elem_classes="mobile-full"):
359
- with gr.Box():
360
  with gr.Row():
361
  repo_url = gr.Textbox(
362
  label="URL Repository GitHub",
@@ -387,7 +387,7 @@ def create_ui():
387
  )
388
 
389
  clone_status = gr.Markdown(
390
- "",
391
  label="Status Repository",
392
  elem_classes="mobile-full"
393
  )
@@ -414,7 +414,7 @@ def create_ui():
414
  """)
415
 
416
  # Improved chat interface
417
- with gr.Box():
418
  chat_input = gr.Textbox(
419
  label="πŸ’­ Tanyakan tentang Repository",
420
  placeholder="Ketik pertanyaan Anda di sini...",
@@ -508,7 +508,7 @@ def create_ui():
508
  if provider_choice == AIProvider.XAI:
509
  return gr.Dropdown(choices=XAI_MODELS, value="grok-2-latest")
510
  elif provider_choice == AIProvider.GEMINI:
511
- return gr.Dropdown(choices=GEMINI_MODELS, value="gemini-1.5-mini")
512
  else: # OLLAMA
513
  return gr.Dropdown(choices=OLLAMA_MODELS, value="llama2")
514
 
 
295
  .gr-form {
296
  flex-direction: column !important;
297
  }
298
+ .gr-group {
299
  margin: 0.5rem 0 !important;
300
  }
301
  }
 
311
  """)
312
 
313
  with gr.Tabs() as tabs:
314
+ with gr.Tab("πŸ› οΈ Konfigurasi", elem_classes="mobile-full"):
315
  provider = gr.Radio(
316
  choices=[AIProvider.XAI, AIProvider.GEMINI, AIProvider.OLLAMA],
317
  label="Penyedia AI",
 
321
  )
322
 
323
  with gr.Group() as api_settings:
324
+ with gr.Group():
325
  with gr.Row():
326
  xai_key = gr.Textbox(
327
  label="X.AI (Grok) API Key",
 
333
  with gr.Column(scale=1):
334
  gr.Markdown(XAI_API_HELP)
335
 
336
+ with gr.Group():
337
  with gr.Row():
338
  gemini_key = gr.Textbox(
339
  label="Gemini API Key",
 
355
  elem_classes="mobile-full"
356
  )
357
 
358
+ with gr.Tab("πŸ“Š Analisis Repository", elem_classes="mobile-full"):
359
+ with gr.Group():
360
  with gr.Row():
361
  repo_url = gr.Textbox(
362
  label="URL Repository GitHub",
 
387
  )
388
 
389
  clone_status = gr.Markdown(
390
+ value="",
391
  label="Status Repository",
392
  elem_classes="mobile-full"
393
  )
 
414
  """)
415
 
416
  # Improved chat interface
417
+ with gr.Group():
418
  chat_input = gr.Textbox(
419
  label="πŸ’­ Tanyakan tentang Repository",
420
  placeholder="Ketik pertanyaan Anda di sini...",
 
508
  if provider_choice == AIProvider.XAI:
509
  return gr.Dropdown(choices=XAI_MODELS, value="grok-2-latest")
510
  elif provider_choice == AIProvider.GEMINI:
511
+ return gr.Dropdown(choices=GEMINI_MODELS, value="gemini-pro")
512
  else: # OLLAMA
513
  return gr.Dropdown(choices=OLLAMA_MODELS, value="llama2")
514