dedemerve commited on
Commit
b1f0bed
Β·
verified Β·
1 Parent(s): 8490669

Upload 2 files

Browse files
Files changed (2) hide show
  1. README.md +0 -1
  2. app.py +4 -4
README.md CHANGED
@@ -1,6 +1,5 @@
1
  ---
2
  title: ILSA LLM Extractor Viewer
3
- emoji: πŸ“š
4
  colorFrom: blue
5
  colorTo: indigo
6
  sdk: gradio
 
1
  ---
2
  title: ILSA LLM Extractor Viewer
 
3
  colorFrom: blue
4
  colorTo: indigo
5
  sdk: gradio
app.py CHANGED
@@ -60,7 +60,7 @@ def _make_source_link(row, doi_col, title_col, venue_col) -> str:
60
  if not _is_blank(doi_val):
61
  doi_clean = str(doi_val).strip()
62
  url = doi_clean if doi_clean.lower().startswith("http") else f"https://doi.org/{doi_clean}"
63
- return f"[πŸ”— Open via DOI]({url})"
64
 
65
  title_val = row.get(title_col) if title_col else None
66
  venue_val = row.get(venue_col) if venue_col else None
@@ -69,7 +69,7 @@ def _make_source_link(row, doi_col, title_col, venue_col) -> str:
69
  if not query:
70
  return ""
71
  q = urllib.parse.quote_plus(query)
72
- return f"[πŸ”Ž Search Google Scholar](https://scholar.google.com/scholar?q={q})"
73
 
74
 
75
  def _truncate(val) -> str:
@@ -126,7 +126,7 @@ def build_table(subset: str, split: str, search_text: str, max_rows: int):
126
  try:
127
  df = _load_raw(subset, split).copy()
128
  except Exception as e: # noqa: BLE001
129
- return gr.update(), f"⚠️ Could not load data: {e}"
130
 
131
  total_rows = len(df)
132
 
@@ -189,7 +189,7 @@ def on_subset_change(subset: str):
189
  with gr.Blocks(title="ILSA-LLM-Extractor β€” Clickable Sources") as demo:
190
  gr.Markdown(
191
  f"""
192
- # πŸ“š ILSA-LLM-Extractor-Dataset β€” Clickable Source Viewer
193
  Hugging Face's standard viewer does not render DOI cells as clickable links.
194
  Here, every row links to **doi.org** when a DOI is available, or to a
195
  **Google Scholar search** based on the title when it isn't.
 
60
  if not _is_blank(doi_val):
61
  doi_clean = str(doi_val).strip()
62
  url = doi_clean if doi_clean.lower().startswith("http") else f"https://doi.org/{doi_clean}"
63
+ return f"[Open via DOI]({url})"
64
 
65
  title_val = row.get(title_col) if title_col else None
66
  venue_val = row.get(venue_col) if venue_col else None
 
69
  if not query:
70
  return ""
71
  q = urllib.parse.quote_plus(query)
72
+ return f"[Search Google Scholar](https://scholar.google.com/scholar?q={q})"
73
 
74
 
75
  def _truncate(val) -> str:
 
126
  try:
127
  df = _load_raw(subset, split).copy()
128
  except Exception as e: # noqa: BLE001
129
+ return gr.update(), f"Could not load data: {e}"
130
 
131
  total_rows = len(df)
132
 
 
189
  with gr.Blocks(title="ILSA-LLM-Extractor β€” Clickable Sources") as demo:
190
  gr.Markdown(
191
  f"""
192
+ # ILSA-LLM-Extractor-Dataset β€” Clickable Source Viewer
193
  Hugging Face's standard viewer does not render DOI cells as clickable links.
194
  Here, every row links to **doi.org** when a DOI is available, or to a
195
  **Google Scholar search** based on the title when it isn't.