Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,8 @@ import json
|
|
5 |
import google.generativeai as genai
|
6 |
from bs4 import BeautifulSoup
|
7 |
from google.ai.generativelanguage_v1beta.types import content
|
|
|
|
|
8 |
#from groq import Groq
|
9 |
# Load environment variables
|
10 |
genai.configure(api_key=os.environ["geminiapikey"])
|
@@ -103,6 +105,8 @@ def websearch(prompt):
|
|
103 |
# Formuliere die Antwort
|
104 |
search_query = f"{prompt} antworte kurz und knapp. antworte auf deutsch. du findest die antwort hier: {result_text}"
|
105 |
result = predict(search_query)
|
|
|
|
|
106 |
return result
|
107 |
return result_text
|
108 |
return results
|
|
|
5 |
import google.generativeai as genai
|
6 |
from bs4 import BeautifulSoup
|
7 |
from google.ai.generativelanguage_v1beta.types import content
|
8 |
+
from IPython.display import display
|
9 |
+
from IPython.display import Markdown
|
10 |
#from groq import Groq
|
11 |
# Load environment variables
|
12 |
genai.configure(api_key=os.environ["geminiapikey"])
|
|
|
105 |
# Formuliere die Antwort
|
106 |
search_query = f"{prompt} antworte kurz und knapp. antworte auf deutsch. du findest die antwort hier: {result_text}"
|
107 |
result = predict(search_query)
|
108 |
+
|
109 |
+
return display(Markdown(result))
|
110 |
return result
|
111 |
return result_text
|
112 |
return results
|