jyo01 commited on
Commit
80a09f4
·
verified ·
1 Parent(s): 8cfda1b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -9
app.py CHANGED
@@ -288,18 +288,13 @@ with gr.Blocks() as demo:
288
  return gr.update(choices=[]), files
289
  return gr.update(choices=files), ""
290
 
291
- # def update_repo_content(github_url, file_choice):
292
- # if not file_choice:
293
- # return "No file selected."
294
- # content, _ = get_file_content_for_choice(github_url, file_choice)
295
- # return content
296
-
297
  def update_repo_content(github_url, file_choice):
298
  if not file_choice:
299
- return [("System", "No file selected.")]
300
  content, _ = get_file_content_for_choice(github_url, file_choice)
301
- # Wrap the content in a tuple so it displays like a chat message.
302
- return [("File Content", content)]
 
303
 
304
 
305
  def process_chat(github_url, file_choice, chat_query, history):
 
288
  return gr.update(choices=[]), files
289
  return gr.update(choices=files), ""
290
 
 
 
 
 
 
 
291
  def update_repo_content(github_url, file_choice):
292
  if not file_choice:
293
+ return "No file selected."
294
  content, _ = get_file_content_for_choice(github_url, file_choice)
295
+ return content
296
+
297
+
298
 
299
 
300
  def process_chat(github_url, file_choice, chat_query, history):