Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
EmidWife-New
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2023-24-005
EmidWife-New
Commits
d52dbbab
Commit
d52dbbab
authored
May 21, 2024
by
Devin B
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
7074ec1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
src/screens/home/skin/AdditionalSymptoms.js
src/screens/home/skin/AdditionalSymptoms.js
+1
-1
src/screens/home/skin/SkinUploader.js
src/screens/home/skin/SkinUploader.js
+17
-3
No files found.
src/screens/home/skin/AdditionalSymptoms.js
View file @
d52dbbab
...
...
@@ -147,7 +147,7 @@ const AdditionalSymptomsScreen2 = ({ navigation }) => {
/
>
<
TouchableOpacity
style
=
{
styles
.
orButton
}
onPress
=
{()
=>
Linking
.
openURL
(
'
https://mywebar.com/p/Project_
0_ysb0ffrwxn
'
)}
>
onPress
=
{()
=>
Linking
.
openURL
(
'
https://mywebar.com/p/Project_
4_lpf4ury2jc
'
)}
>
<
Text
style
=
{
styles
.
orButtonText
}
>
OR
Click
This
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
...
...
src/screens/home/skin/SkinUploader.js
View file @
d52dbbab
import
React
,
{
useState
}
from
'
react
'
;
import
{
View
,
StyleSheet
,
Image
,
TouchableOpacity
,
PermissionsAndroid
,
Text
,
ScrollView
}
from
'
react-native
'
;
import
{
View
,
StyleSheet
,
Image
,
TouchableOpacity
,
PermissionsAndroid
,
Text
,
ScrollView
,
ActivityIndicator
}
from
'
react-native
'
;
import
{
launchCamera
,
launchImageLibrary
}
from
'
react-native-image-picker
'
;
import
{
COLORS
,
IMGS
,
ROUTES
}
from
'
../../../constants
'
;
import
Button
from
'
../../../components/Button
'
;
...
...
@@ -10,7 +10,7 @@ const Camera = ({ navigation }) => {
const
[
galleryPhoto
,
setGalleryPhoto
]
=
useState
();
const
REACT_APP_API_URL
=
'
https://us-central1-skin-condition-detection.cloudfunctions.net/predict
'
;
const
[
prediction
,
setPrediction
]
=
useState
(
null
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
photo
,
setPhoto
]
=
useState
(
null
);
...
...
@@ -128,13 +128,20 @@ const Camera = ({ navigation }) => {
<
/View
>
<
Text
style
=
{
styles
.
descriptionText
}
>
'
Use phone camera or select a photo from the gallery that clearly shows your skin.
'
<
/Text
>
<
View
style
=
{
styles
.
bottomContainer
}
>
{
loading
?
(
<
View
style
=
{
styles
.
loaderContainer
}
>
<
ActivityIndicator
size
=
"
large
"
color
=
{
COLORS
.
primary
}
/
>
<
/View
>
)
:
(
<>
{
!
prediction
&&
(
<>
<
Text
style
=
{
styles
.
resultsHeading
}
>
Results
will
appear
below
<
/Text
>
<
/
>
)}
{
prediction
&&
(
{
!
loading
&&
prediction
&&
(
<
View
style
=
{
styles
.
predictionContainer
}
>
<
Text
style
=
{
styles
.
predictionText
}
>
Diagnosed
Condition
|
හඳුනාගත්
සමේ
ආසාදනය
:
{
prediction
.
class
}
<
/Text
>
<
Text
style
=
{
styles
.
predictionText
}
>
How
sure
are
we
|
නිරවද්යතාව
:
{
prediction
.
confidence
}
<
/Text
>
...
...
@@ -145,6 +152,8 @@ const Camera = ({ navigation }) => {
style
=
{
styles
.
nextButton
}
onPress
=
{
handleContinue
}
/
>
<
/
>
)}
<
/View
>
<
/View
>
);
...
...
@@ -299,6 +308,11 @@ const styles = StyleSheet.create({
alignSelf
:
'
center
'
,
marginVertical
:
20
,
// Adjust margin as needed
},
loaderContainer
:
{
flex
:
1
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
},
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment