Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ def llm(message):
|
|
19 |
model="Mixtral-8x7b-32768",
|
20 |
messages=[
|
21 |
{"role": "system", "content": "You are a helpful assistant."},
|
22 |
-
{"role": "user", "content": f"{message}. antworte immer auf deutsch"}
|
23 |
],
|
24 |
)
|
25 |
return completion.choices[0].message.content
|
@@ -81,6 +81,16 @@ def google_search(query):
|
|
81 |
|
82 |
def process_ort(ort):
|
83 |
links_text = list_of_clubs(ort)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
return links_text
|
85 |
|
86 |
demo = gr.Interface(
|
|
|
19 |
model="Mixtral-8x7b-32768",
|
20 |
messages=[
|
21 |
{"role": "system", "content": "You are a helpful assistant."},
|
22 |
+
{"role": "user", "content": f"return a json object with the keys name,email,phone. fill in the values which can be found here, leave blank if information not avaiable:\n {message}. antworte immer auf deutsch"}
|
23 |
],
|
24 |
)
|
25 |
return completion.choices[0].message.content
|
|
|
81 |
|
82 |
def process_ort(ort):
|
83 |
links_text = list_of_clubs(ort)
|
84 |
+
vereine = []
|
85 |
+
for verein in links_text:
|
86 |
+
query = f"impressum {verein}"
|
87 |
+
contact_detailes = google_search(query)
|
88 |
+
json_object = llm(contact_detailes)
|
89 |
+
vereine.extend(json_object)
|
90 |
+
|
91 |
+
return vereine
|
92 |
+
|
93 |
+
|
94 |
return links_text
|
95 |
|
96 |
demo = gr.Interface(
|