Spaces:
Runtime error
Runtime error
nest_asyncio
Browse files- app.py +2 -2
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from pydantic_ai import Agent
|
| 3 |
from pydantic_ai.models.groq import GroqModel
|
|
|
|
| 4 |
|
| 5 |
|
| 6 |
|
|
@@ -18,7 +19,6 @@ async def main():
|
|
| 18 |
##The Zorvath
|
| 19 |
|
| 20 |
|
| 21 |
-
|
| 22 |
#print(result_1.data)
|
| 23 |
|
| 24 |
#result_2 = agent.run_sync("What are the major tourust attraction in planet The Zorvath",message_history=result_1.new_messages())
|
|
@@ -30,5 +30,5 @@ async def main():
|
|
| 30 |
|
| 31 |
if __name__ == '__main__':
|
| 32 |
import asyncio
|
| 33 |
-
|
| 34 |
asyncio.run(main())
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from pydantic_ai import Agent
|
| 3 |
from pydantic_ai.models.groq import GroqModel
|
| 4 |
+
import nest_asyncio
|
| 5 |
|
| 6 |
|
| 7 |
|
|
|
|
| 19 |
##The Zorvath
|
| 20 |
|
| 21 |
|
|
|
|
| 22 |
#print(result_1.data)
|
| 23 |
|
| 24 |
#result_2 = agent.run_sync("What are the major tourust attraction in planet The Zorvath",message_history=result_1.new_messages())
|
|
|
|
| 30 |
|
| 31 |
if __name__ == '__main__':
|
| 32 |
import asyncio
|
| 33 |
+
nest_asyncio.apply()
|
| 34 |
asyncio.run(main())
|
requirements.txt
CHANGED
|
@@ -3,4 +3,5 @@ streamlit_pdf_reader
|
|
| 3 |
pdfplumber
|
| 4 |
streamlit_pdf_viewer
|
| 5 |
pydantic_ai
|
|
|
|
| 6 |
#pydantic_ai.models.groq
|
|
|
|
| 3 |
pdfplumber
|
| 4 |
streamlit_pdf_viewer
|
| 5 |
pydantic_ai
|
| 6 |
+
nest_asyncio
|
| 7 |
#pydantic_ai.models.groq
|