Prathamesh1420 commited on
Commit
da1e8a0
1 Parent(s): 6b762dd

Update app.py

Browse files

dashboard visble now solving error

Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -3,7 +3,6 @@ from crewai import Agent, Task, Crew
3
  from langchain_google_genai import ChatGoogleGenerativeAI
4
  from dotenv import load_dotenv
5
  import os
6
- import asyncio
7
  import nest_asyncio
8
 
9
  # Load environment variables
@@ -97,7 +96,7 @@ def main():
97
  if topic:
98
  with st.spinner('Generating content...'):
99
  try:
100
- result = asyncio.run(crew.kickoff(inputs={"topic": topic})) # Wrap the kickoff call
101
  st.markdown(result)
102
  except Exception as e:
103
  st.error(f"An error occurred: {e}")
 
3
  from langchain_google_genai import ChatGoogleGenerativeAI
4
  from dotenv import load_dotenv
5
  import os
 
6
  import nest_asyncio
7
 
8
  # Load environment variables
 
96
  if topic:
97
  with st.spinner('Generating content...'):
98
  try:
99
+ result = crew.kickoff(inputs={"topic": topic})
100
  st.markdown(result)
101
  except Exception as e:
102
  st.error(f"An error occurred: {e}")