Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,6 @@ import google.generativeai as genai
|
|
| 14 |
genai.configure(api_key="AIzaSyBO3-HG-WcITn58PdpK7mMyvFQitoH00qA") # Replace with your actual Gemini API key
|
| 15 |
|
| 16 |
# Load Gemini model
|
| 17 |
-
gemini_model = genai.GenerativeModel('gemini-pro')
|
| 18 |
|
| 19 |
|
| 20 |
import re
|
|
@@ -38,7 +37,7 @@ classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnl
|
|
| 38 |
print("Loading embedding model...")
|
| 39 |
embedding_model = SentenceTransformer("intfloat/e5-large")
|
| 40 |
|
| 41 |
-
|
| 42 |
# Use a lighter model for testing
|
| 43 |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, pipeline
|
| 44 |
|
|
@@ -104,8 +103,7 @@ Format the following LaTeX-based math solution into a clean, human-readable expl
|
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
-
|
| 108 |
-
{question}
|
| 109 |
|
| 110 |
Use the following context if needed:
|
| 111 |
{f}
|
|
|
|
| 14 |
genai.configure(api_key="AIzaSyBO3-HG-WcITn58PdpK7mMyvFQitoH00qA") # Replace with your actual Gemini API key
|
| 15 |
|
| 16 |
# Load Gemini model
|
|
|
|
| 17 |
|
| 18 |
|
| 19 |
import re
|
|
|
|
| 37 |
print("Loading embedding model...")
|
| 38 |
embedding_model = SentenceTransformer("intfloat/e5-large")
|
| 39 |
|
| 40 |
+
|
| 41 |
# Use a lighter model for testing
|
| 42 |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, pipeline
|
| 43 |
|
|
|
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
+
|
|
|
|
| 107 |
|
| 108 |
Use the following context if needed:
|
| 109 |
{f}
|