Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,9 @@ def extract_text(file):
|
|
52 |
|
53 |
# Urdu content generation model (replace with your preferred model)
|
54 |
urdu_gen_model_name = "mwz/UrduGPT2" # Replace placeholder
|
55 |
-
|
|
|
|
|
56 |
|
57 |
|
58 |
def answer_questions(document, question):
|
@@ -90,4 +92,4 @@ def main():
|
|
90 |
st.warning("Couldn't find an answer. Try rephrasing your question.")
|
91 |
|
92 |
if __name__ == "__main__":
|
93 |
-
main()
|
|
|
52 |
|
53 |
# Urdu content generation model (replace with your preferred model)
|
54 |
urdu_gen_model_name = "mwz/UrduGPT2" # Replace placeholder
|
55 |
+
|
56 |
+
# Load the model using TensorFlow weights
|
57 |
+
urdu_gen_pipe = pipeline("text-generation", model=urdu_gen_model_name, framework="tf")
|
58 |
|
59 |
|
60 |
def answer_questions(document, question):
|
|
|
92 |
st.warning("Couldn't find an answer. Try rephrasing your question.")
|
93 |
|
94 |
if __name__ == "__main__":
|
95 |
+
main()
|