sarim commited on
Commit
b80b685
·
1 Parent(s): 1dd4286
Files changed (2) hide show
  1. app.py +2 -12
  2. requirements.txt +0 -1
app.py CHANGED
@@ -3,21 +3,20 @@ import streamlit as st
3
  from pydantic_ai import Agent
4
  from pydantic_ai.models.groq import GroqModel
5
  from pydantic_ai.models.anthropic import AnthropicModel
 
6
  import nest_asyncio
7
  import random
8
  import planet_model as customModel
9
  from typing import List, Dict
10
  import constants
11
  import os
12
- from ollama import chat
13
- from ollama import ChatResponse
14
 
15
  api_key = os.getenv("api_key")
16
 
17
 
18
  random_number = random.randint(3000, 10000)
19
 
20
- model = AnthropicModel('claude-3-5-sonnet-latest', api_key = api_key)
21
 
22
 
23
  async def onClick(vacationType,familyType,duration,purpose,interests):
@@ -88,15 +87,6 @@ async def main():
88
  duration = ""
89
  purpose = ""
90
  interests = ""
91
- response: ChatResponse = chat(model='llama3.2', messages=[
92
- {
93
- 'role': 'user',
94
- 'content': 'Why is the sky blue?',
95
- },
96
- ])
97
- print(response['message']['content'])
98
- # or access fields directly from the response object
99
- print(response.message.content)
100
 
101
 
102
  if __name__ == '__main__':
 
3
  from pydantic_ai import Agent
4
  from pydantic_ai.models.groq import GroqModel
5
  from pydantic_ai.models.anthropic import AnthropicModel
6
+ from pydantic_ai.models.mistral import MistralModel
7
  import nest_asyncio
8
  import random
9
  import planet_model as customModel
10
  from typing import List, Dict
11
  import constants
12
  import os
 
 
13
 
14
  api_key = os.getenv("api_key")
15
 
16
 
17
  random_number = random.randint(3000, 10000)
18
 
19
+ model = MistralModel('mistral-small-latest', api_key = 'ZGs1ZTvw6csiboQnBC9mi1cmsBjAPRu7')
20
 
21
 
22
  async def onClick(vacationType,familyType,duration,purpose,interests):
 
87
  duration = ""
88
  purpose = ""
89
  interests = ""
 
 
 
 
 
 
 
 
 
90
 
91
 
92
  if __name__ == '__main__':
requirements.txt CHANGED
@@ -4,5 +4,4 @@ pdfplumber
4
  streamlit_pdf_viewer
5
  pydantic_ai
6
  nest_asyncio
7
- ollama
8
  #pydantic_ai.models.groq
 
4
  streamlit_pdf_viewer
5
  pydantic_ai
6
  nest_asyncio
 
7
  #pydantic_ai.models.groq