Spaces:
Runtime error
Runtime error
Deepak Yadav
commited on
Commit
Β·
ad8d799
1
Parent(s):
6947272
updated new version deepseek-r1
Browse files- Dockerfile +1 -1
- README.md +3 -2
- services/llm.py +2 -2
Dockerfile
CHANGED
|
@@ -21,4 +21,4 @@ COPY . .
|
|
| 21 |
EXPOSE 11434 8501
|
| 22 |
|
| 23 |
# Start both Ollama and Streamlit
|
| 24 |
-
CMD ["bash", "-c", "ollama serve & sleep 5 && streamlit run app.py --server.port 8501 --server.enableCORS false --server.enableXsrfProtection false"]
|
|
|
|
| 21 |
EXPOSE 11434 8501
|
| 22 |
|
| 23 |
# Start both Ollama and Streamlit
|
| 24 |
+
# CMD ["bash", "-c", "ollama serve & sleep 5 && streamlit run app.py --server.port 8501 --server.enableCORS false --server.enableXsrfProtection false"]
|
README.md
CHANGED
|
@@ -3,10 +3,11 @@ title: LLM Based Custom Pdf Chatbot
|
|
| 3 |
emoji: π
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: red
|
| 6 |
-
sdk:
|
|
|
|
| 7 |
app_file: app.py
|
| 8 |
pinned: false
|
| 9 |
-
license:
|
| 10 |
---
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 3 |
emoji: π
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: red
|
| 6 |
+
sdk: streamlit
|
| 7 |
+
sdk_version: 1.42.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
+
license: mit
|
| 11 |
---
|
| 12 |
|
| 13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
services/llm.py
CHANGED
|
@@ -23,7 +23,7 @@ def initialize_qa_chain(filepath, model_name, temperature, top_p, max_tokens):
|
|
| 23 |
# Configure the LLM with additional parameters
|
| 24 |
llm = OllamaLLM(
|
| 25 |
model=model_name,
|
| 26 |
-
|
| 27 |
temperature=temperature, # Controls randomness (0 = deterministic, 1 = max randomness)
|
| 28 |
max_tokens=max_tokens, # Limit the number of tokens in the output
|
| 29 |
top_p=top_p # Nucleus sampling for controlling diversity
|
|
@@ -71,7 +71,7 @@ def initialize_chain(model_name, temperature, top_p, max_tokens):
|
|
| 71 |
# Configure the LLM with additional parameters
|
| 72 |
llm = OllamaLLM(
|
| 73 |
model=model_name,
|
| 74 |
-
|
| 75 |
temperature=temperature, # Controls randomness (0 = deterministic, 1 = max randomness)
|
| 76 |
max_tokens=max_tokens, # Limit the number of tokens in the output
|
| 77 |
top_p=top_p # Nucleus sampling for controlling diversity
|
|
|
|
| 23 |
# Configure the LLM with additional parameters
|
| 24 |
llm = OllamaLLM(
|
| 25 |
model=model_name,
|
| 26 |
+
base_url="https://deepak7376-ollama-server.hf.space",
|
| 27 |
temperature=temperature, # Controls randomness (0 = deterministic, 1 = max randomness)
|
| 28 |
max_tokens=max_tokens, # Limit the number of tokens in the output
|
| 29 |
top_p=top_p # Nucleus sampling for controlling diversity
|
|
|
|
| 71 |
# Configure the LLM with additional parameters
|
| 72 |
llm = OllamaLLM(
|
| 73 |
model=model_name,
|
| 74 |
+
base_url="https://deepak7376-ollama-server.hf.space",
|
| 75 |
temperature=temperature, # Controls randomness (0 = deterministic, 1 = max randomness)
|
| 76 |
max_tokens=max_tokens, # Limit the number of tokens in the output
|
| 77 |
top_p=top_p # Nucleus sampling for controlling diversity
|