mgokg commited on
Commit
b47d3fc
·
verified ·
1 Parent(s): 8ed0756

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -19
app.py CHANGED
@@ -5,28 +5,12 @@ from urllib.parse import urljoin
5
  from gradio_client import Client
6
  import json
7
  import csv
8
- import pandas
9
- import groq
10
- import os
11
 
12
  #api_key = os.getenv('groq')
13
  client = Client("mgokg/PerplexicaApi")
14
- # Use Llama 3 70B powered by Groq for answering
15
- def update(message):
16
- api_key=""
17
- client_groq = groq.Client(api_key=api_key)
18
- try:
19
- completion = client_groq.chat.completions.create(
20
- model="llama3-70b-8192",
21
- messages=[
22
- {"role": "system", "content": "You are a helpful assistant."},
23
- {"role": "user", "content": f"{message}. antworte immer auf deutsch"}
24
- ],
25
- )
26
- return completion.choices[0].message.content
27
- except Exception as e:
28
- return f"Error in response generation: {str(e)}"
29
-
30
 
31
  def parse_links_and_content(ort):
32
  base_url = "https://vereine-in-deutschland.net"
 
5
  from gradio_client import Client
6
  import json
7
  import csv
8
+ #import pandas
9
+ #import groq
10
+ #import os
11
 
12
  #api_key = os.getenv('groq')
13
  client = Client("mgokg/PerplexicaApi")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  def parse_links_and_content(ort):
16
  base_url = "https://vereine-in-deutschland.net"