bhardwaj08sarthak commited on
Commit
7b650cf
·
verified ·
1 Parent(s): 5ad52f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -91,11 +91,11 @@ LOCAL_BASE = WRITABLE_BASE / "my_app_cache" / "index"
91
  LOCAL_BASE.mkdir(parents=True, exist_ok=True)
92
 
93
  # Download only the persisted index folder
 
94
  snapshot_download(
95
  repo_id=DATASET_REPO,
96
  repo_type="dataset",
97
  local_dir=str(LOCAL_BASE),
98
- allow_patterns=[f"{PERSIST_SUBDIR}/**"],
99
  local_dir_use_symlinks=False,
100
  )
101
 
@@ -138,7 +138,7 @@ except Exception:
138
 
139
  emb = HuggingFaceEmbeddings(
140
  model_name="google/embeddinggemma-300m",
141
- model_kwargs={"device": _emb_device, "attn_implementation": "eager"},
142
  encode_kwargs={"normalize_embeddings": True},
143
  )
144
 
@@ -251,7 +251,7 @@ with gr.Blocks() as demo:
251
  )
252
  subject = gr.Textbox(value="Math", label="Subject")
253
  task_type = gr.Dropdown(
254
- choices=["TASK_TMPL", "CLASSIFY_TMPL", "GEN_TMPL", "RAG_TMPL"],
255
  label="task type"
256
  )
257
 
 
91
  LOCAL_BASE.mkdir(parents=True, exist_ok=True)
92
 
93
  # Download only the persisted index folder
94
+
95
  snapshot_download(
96
  repo_id=DATASET_REPO,
97
  repo_type="dataset",
98
  local_dir=str(LOCAL_BASE),
 
99
  local_dir_use_symlinks=False,
100
  )
101
 
 
138
 
139
  emb = HuggingFaceEmbeddings(
140
  model_name="google/embeddinggemma-300m",
141
+ model_kwargs={"device": _emb_device}, #"attn_implementation": "eager"},
142
  encode_kwargs={"normalize_embeddings": True},
143
  )
144
 
 
251
  )
252
  subject = gr.Textbox(value="Math", label="Subject")
253
  task_type = gr.Dropdown(
254
+ choices=["rag_temp", "rag_cls_temp", "cls_temp", "gen_temp"],
255
  label="task type"
256
  )
257