Spaces:
Running
Running
Commit
·
be45289
1
Parent(s):
6afc72e
change model to llama and inference provider to groq
Browse files- .gitattributes +1 -0
- .gitignore +1 -0
- .vscode/settings.json +5 -0
- README.md +1 -1
- app.py +10 -2
- docs/Prakash_CV.pdf +0 -0
- docs/biography.txt +2 -2
- docs/websites.urls +1 -0
- faiss_index/index.faiss +0 -0
- faiss_index/index.pkl +2 -2
- requirements.txt +1 -1
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
*.faiss filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
docs
|
.vscode/settings.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"python-envs.defaultEnvManager": "ms-python.python:conda",
|
| 3 |
+
"python-envs.defaultPackageManager": "ms-python.python:conda",
|
| 4 |
+
"python-envs.pythonProjects": []
|
| 5 |
+
}
|
README.md
CHANGED
|
@@ -9,4 +9,4 @@ app_file: app.py
|
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
-
An example chatbot using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index).
|
|
|
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
+
An example chatbot which answers question about me using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index).
|
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
|
|
|
| 3 |
|
| 4 |
# RAG imports
|
| 5 |
import os
|
|
@@ -11,7 +12,13 @@ from langchain.text_splitter import RecursiveCharacterTextSplitter
|
|
| 11 |
"""
|
| 12 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
| 13 |
"""
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
# We'll load the existing FAISS index at the start
|
| 17 |
INDEX_FOLDER = "faiss_index"
|
|
@@ -74,7 +81,8 @@ def respond(
|
|
| 74 |
top_p=top_p,
|
| 75 |
):
|
| 76 |
token = message.choices[0].delta.content
|
| 77 |
-
|
|
|
|
| 78 |
response += token
|
| 79 |
yield response
|
| 80 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
+
import os
|
| 4 |
|
| 5 |
# RAG imports
|
| 6 |
import os
|
|
|
|
| 12 |
"""
|
| 13 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
| 14 |
"""
|
| 15 |
+
hf_token = os.environ.get("HUGGINGFACEHUB_API_TOKEN")
|
| 16 |
+
client = InferenceClient(
|
| 17 |
+
model="meta-llama/Llama-3.3-70B-Instruct",
|
| 18 |
+
provider="groq",
|
| 19 |
+
token=hf_token # <-- This is critical
|
| 20 |
+
)
|
| 21 |
+
|
| 22 |
|
| 23 |
# We'll load the existing FAISS index at the start
|
| 24 |
INDEX_FOLDER = "faiss_index"
|
|
|
|
| 81 |
top_p=top_p,
|
| 82 |
):
|
| 83 |
token = message.choices[0].delta.content
|
| 84 |
+
if token is None:
|
| 85 |
+
continue
|
| 86 |
response += token
|
| 87 |
yield response
|
| 88 |
|
docs/Prakash_CV.pdf
DELETED
|
Binary file (117 kB)
|
|
|
docs/biography.txt
CHANGED
|
@@ -9,7 +9,7 @@ Computer Graphics, GenAI, Human Computer Interaction, Deep Learning, Machine Lea
|
|
| 9 |
solve real-world problems with impactful AI aided solutions.
|
| 10 |
|
| 11 |
EDUCATION
|
| 12 |
-
|
| 13 |
Oct 2020 – Present
|
| 14 |
Grade: 1.6/5.0 (1.0 being the best possible score)
|
| 15 |
Thesis: Novel View Synthesis of Structural Color Objects Created by Laser Markings. (1.3)
|
|
@@ -18,7 +18,7 @@ High-Level Computer Vision, Statistics with R, Adversarial Reinforcement Learnin
|
|
| 18 |
Games & Interactive Media.
|
| 19 |
[Audited]: Geometric Modeling, Machine Learning, AI, Ethics for Nerds
|
| 20 |
|
| 21 |
-
|
| 22 |
June 2011 – May 2015
|
| 23 |
Grade: 65% (First Class)
|
| 24 |
Thesis: Secure Data Storage on Multi-Cloud Using DNA Based Cryptography.
|
|
|
|
| 9 |
solve real-world problems with impactful AI aided solutions.
|
| 10 |
|
| 11 |
EDUCATION
|
| 12 |
+
Masters in MSc Media Informatics at Saarland University, Germany
|
| 13 |
Oct 2020 – Present
|
| 14 |
Grade: 1.6/5.0 (1.0 being the best possible score)
|
| 15 |
Thesis: Novel View Synthesis of Structural Color Objects Created by Laser Markings. (1.3)
|
|
|
|
| 18 |
Games & Interactive Media.
|
| 19 |
[Audited]: Geometric Modeling, Machine Learning, AI, Ethics for Nerds
|
| 20 |
|
| 21 |
+
Bachelor of Engineering in Computer Engineering at Pune University, India
|
| 22 |
June 2011 – May 2015
|
| 23 |
Grade: 65% (First Class)
|
| 24 |
Thesis: Secure Data Storage on Multi-Cloud Using DNA Based Cryptography.
|
docs/websites.urls
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
https://www.linkedin.com/in/prakashknaikade/
|
| 2 |
https://prakashknaikade.github.io/
|
|
|
|
| 3 |
https://prakashknaikade.github.io/project/ludwig-palette/
|
| 4 |
https://prakashknaikade.github.io/project/diffusion-models/
|
| 5 |
https://prakashknaikade.github.io/publications/nvs_structural_color_object/
|
|
|
|
| 1 |
https://www.linkedin.com/in/prakashknaikade/
|
| 2 |
https://prakashknaikade.github.io/
|
| 3 |
+
https://prakashknaikade.github.io/project/3d-ai/
|
| 4 |
https://prakashknaikade.github.io/project/ludwig-palette/
|
| 5 |
https://prakashknaikade.github.io/project/diffusion-models/
|
| 6 |
https://prakashknaikade.github.io/publications/nvs_structural_color_object/
|
faiss_index/index.faiss
CHANGED
|
Binary files a/faiss_index/index.faiss and b/faiss_index/index.faiss differ
|
|
|
faiss_index/index.pkl
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:60c95e95908e20be3465efc64af6050058649d974f41778620a2c44a09944699
|
| 3 |
+
size 58032
|
requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
huggingface_hub
|
| 2 |
langchain-community
|
| 3 |
faiss-cpu
|
| 4 |
sentence-transformers
|
|
|
|
| 1 |
+
huggingface_hub
|
| 2 |
langchain-community
|
| 3 |
faiss-cpu
|
| 4 |
sentence-transformers
|