NassimeBejaia commited on
Commit
c74830c
·
verified ·
1 Parent(s): 8579347

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -10,9 +10,9 @@ st.write("API Key:", DEEPSEEK_API_KEY[:8] if DEEPSEEK_API_KEY else "Not Found")
10
  # API endpoint for DeepSeek
11
  #DEEPSEEK_API_URL = "https://api.deepseek.com/v1/completions"
12
  # API endpoint for DeepSeek
13
- #DEEPSEEK_API_URL = "https://api.deepseek.com/chat/completions"
14
 
15
- DEEPSEEK_API_URL = "https://api.deepseek.com/v1/completions"
16
 
17
  # Parse as response.json()["choices"][0]["text"]
18
 
@@ -35,7 +35,7 @@ if st.button("Improve Sentence"):
35
  if user_input:
36
  prompt = f"Correct and improve this sentence: '{user_input}'"
37
  payload = {
38
- "model": "deepseek-coder", # Adjust if you have a specific DeepSeek model in mind
39
  "prompt": prompt,
40
  "max_tokens": 100,
41
  "temperature": 0.7
@@ -85,7 +85,7 @@ if st.session_state.corrected_sentence:
85
  f"User asks: '{chat_text}'. Respond naturally."
86
  )
87
  payload = {
88
- "model": "deepseek-coder",
89
  "prompt": prompt,
90
  "max_tokens": 100,
91
  "temperature": 0.7
 
10
  # API endpoint for DeepSeek
11
  #DEEPSEEK_API_URL = "https://api.deepseek.com/v1/completions"
12
  # API endpoint for DeepSeek
13
+ DEEPSEEK_API_URL = "https://api.deepseek.com/chat/completions"
14
 
15
+ #DEEPSEEK_API_URL = "https://api.deepseek.com/v1/completions"
16
 
17
  # Parse as response.json()["choices"][0]["text"]
18
 
 
35
  if user_input:
36
  prompt = f"Correct and improve this sentence: '{user_input}'"
37
  payload = {
38
+ "model": "deepseek-chat", # Adjust if you have a specific DeepSeek model in mind
39
  "prompt": prompt,
40
  "max_tokens": 100,
41
  "temperature": 0.7
 
85
  f"User asks: '{chat_text}'. Respond naturally."
86
  )
87
  payload = {
88
+ "model": "deepseek-chat",
89
  "prompt": prompt,
90
  "max_tokens": 100,
91
  "temperature": 0.7