broadfield-dev commited on
Commit
6fb9d53
·
verified ·
1 Parent(s): dc93b06

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -128,10 +128,10 @@ def load_file_content_backend(token, repo_id, repo_type, filepath):
128
 
129
  ext = os.path.splitext(filepath)[1].lstrip('.').lower()
130
  lang_map = {'py': 'python', 'js': 'javascript', 'md': 'markdown'}
131
- language = lang_map.get(ext, 'pythom')
132
  return content, language
133
  except Exception as e:
134
- return f"Error loading file: {e}", 'pythom'
135
 
136
  def load_file_content_for_editor(token, repo_id, repo_type, filepath):
137
  """Gradio wrapper to update the code editor when a file is selected."""
 
128
 
129
  ext = os.path.splitext(filepath)[1].lstrip('.').lower()
130
  lang_map = {'py': 'python', 'js': 'javascript', 'md': 'markdown'}
131
+ language = lang_map.get(ext, 'python')
132
  return content, language
133
  except Exception as e:
134
+ return f"Error loading file: {e}", 'python'
135
 
136
  def load_file_content_for_editor(token, repo_id, repo_type, filepath):
137
  """Gradio wrapper to update the code editor when a file is selected."""