Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: Cannot Import 'gen_from_image' from 'src.utils' in app.py(Utils.py not found) #14

Open
ANJAN672 opened this issue Oct 18, 2024 · 1 comment

Comments

@ANJAN672
Copy link

Issue Description:
When attempting to run the app.py file in the OpenHealth project, I encountered the following error:

javascript
Copy code
ImportError: cannot import name 'gen_from_image' from 'src.utils' (c:\Users\srika\OneDrive\Desktop\vyshnavi_senior\OpenHealth\src\utils.py)
Steps to Reproduce:
Clone the repository and navigate to the project directory.
Run the app.py file using the command: python -u app.py.
The error appears upon execution, indicating that the gen_from_image, gen_from_text, and get_med functions cannot be imported from src/utils.py.
Expected Behavior:
The app.py script should run without throwing an import error, and the necessary functions (gen_from_image, gen_from_text, get_med) should be successfully imported from utils.py.

Actual Behavior:
The script raises an ImportError, indicating that the gen_from_image, gen_from_text, and get_med functions do not exist in the src/utils.py file. The utils.py file is either empty or missing these definitions.

Suggested Fix:
Check whether the utils.py file has been properly created and saved in the src/ directory.
Ensure that the required functions (gen_from_image, gen_from_text, get_med) are defined in utils.py.
If the functions are missing, they need to be implemented, or the imports in app.py should be updated based on existing utilities.
Additional Information:
Python version: [Your Python Version]
TensorFlow version: [Your TensorFlow Version]
OS: Windows 10
Please review the issue and provide guidance on resolving the missing functions in the utils.py file.

Copy link

dagshub bot commented Oct 18, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant