Abbasid commited on
Commit
ccecb82
1 Parent(s): 6814e6c

Update TableQAGradio.py

Browse files
Files changed (1) hide show
  1. TableQAGradio.py +4 -1
TableQAGradio.py CHANGED
@@ -21,7 +21,10 @@ def main(model_choice, file_path, text):
21
  }
22
 
23
  # Get the selected model
24
- model = models[model_choice]
 
 
 
25
 
26
  # Run the model
27
  result = model(tqa_pipeline_input)["answer"]
 
21
  }
22
 
23
  # Get the selected model
24
+ model = models.get(model_choice)
25
+ if model is None:
26
+ return f"Model choice '{model_choice}' not found."
27
+
28
 
29
  # Run the model
30
  result = model(tqa_pipeline_input)["answer"]