Update TableQAGradio.py
Browse files- 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
|
|
|
|
|
|
|
|
|
|
| 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"]
|