Spaces:
Sleeping
Sleeping
Commit
·
ab3a211
1
Parent(s):
b958956
chore
Browse filesSigned-off-by: Suvaditya Mukherjee <[email protected]>
app.py
CHANGED
@@ -135,24 +135,37 @@ if __name__ == "__main__":
|
|
135 |
parallel=0,
|
136 |
)
|
137 |
|
138 |
-
wandb.login(
|
139 |
-
|
140 |
-
)
|
141 |
|
142 |
model_name = "Qwen/Qwen2.5-3B-Instruct"
|
143 |
|
144 |
-
wandb.init(
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
)
|
153 |
|
154 |
@spaces.GPU
|
155 |
def rag_process(message, chat_history):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
# Append current user message to chat history
|
157 |
current_message = {
|
158 |
"role": "user",
|
@@ -195,8 +208,6 @@ if __name__ == "__main__":
|
|
195 |
}
|
196 |
wandb.log(metrics)
|
197 |
|
198 |
-
wandb.finish()
|
199 |
-
|
200 |
return generated_text[:-10]
|
201 |
|
202 |
model = AutoModelForCausalLM.from_pretrained(
|
@@ -221,7 +232,8 @@ if __name__ == "__main__":
|
|
221 |
title="Suvaditya's Personal RAG, a space on ZeroGPU!",
|
222 |
examples=["Where did Suvaditya complete his Bachelor's Degree?", "Where is Suvaditya currently working?"],
|
223 |
description="Ask any question about Suvaditya's resume and get an answer!",
|
224 |
-
# theme="glass"
|
225 |
theme="John6666/YntecDark"
|
226 |
)
|
227 |
-
demo.launch()
|
|
|
|
|
|
135 |
parallel=0,
|
136 |
)
|
137 |
|
138 |
+
# wandb.login(
|
139 |
+
# key=os.getenv("WANDB_API_KEY")
|
140 |
+
# )
|
141 |
|
142 |
model_name = "Qwen/Qwen2.5-3B-Instruct"
|
143 |
|
144 |
+
# wandb.init(
|
145 |
+
# project="resume-rag",
|
146 |
+
# name="zerogpu-run",
|
147 |
+
# save_code=True,
|
148 |
+
# config={
|
149 |
+
# "model_name": model_name,
|
150 |
+
# "resume_url": RESUME_URL
|
151 |
+
# }
|
152 |
+
# )
|
153 |
|
154 |
@spaces.GPU
|
155 |
def rag_process(message, chat_history):
|
156 |
+
wandb.login(
|
157 |
+
key=os.getenv("WANDB_API_KEY")
|
158 |
+
)
|
159 |
+
|
160 |
+
wandb.init(
|
161 |
+
project="resume-rag",
|
162 |
+
name="zerogpu-run",
|
163 |
+
save_code=True,
|
164 |
+
config={
|
165 |
+
"model_name": model_name,
|
166 |
+
"resume_url": RESUME_URL
|
167 |
+
}
|
168 |
+
)
|
169 |
# Append current user message to chat history
|
170 |
current_message = {
|
171 |
"role": "user",
|
|
|
208 |
}
|
209 |
wandb.log(metrics)
|
210 |
|
|
|
|
|
211 |
return generated_text[:-10]
|
212 |
|
213 |
model = AutoModelForCausalLM.from_pretrained(
|
|
|
232 |
title="Suvaditya's Personal RAG, a space on ZeroGPU!",
|
233 |
examples=["Where did Suvaditya complete his Bachelor's Degree?", "Where is Suvaditya currently working?"],
|
234 |
description="Ask any question about Suvaditya's resume and get an answer!",
|
|
|
235 |
theme="John6666/YntecDark"
|
236 |
)
|
237 |
+
demo.launch()
|
238 |
+
|
239 |
+
wandb.finish()
|