-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from garvsl/garv-branch
UI Changes
- Loading branch information
Showing
45 changed files
with
28,327 additions
and
2,680 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,6 @@ ml/openAIKey.json | |
|
||
# macOS | ||
.DS_Store | ||
env.json | ||
|
||
yarn-error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-476 KB
(7.3%)
android/app/src/main/res/drawable-hdpi/splashscreen_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-476 KB
(7.3%)
android/app/src/main/res/drawable-mdpi/splashscreen_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-476 KB
(7.3%)
android/app/src/main/res/drawable-xhdpi/splashscreen_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-476 KB
(7.3%)
android/app/src/main/res/drawable-xxhdpi/splashscreen_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-476 KB
(7.3%)
android/app/src/main/res/drawable-xxxhdpi/splashscreen_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { useWindowDimensions } from "react-native"; | ||
|
||
const guidelineBaseWidth = 375; | ||
const guidelineBaseHeight = 812; | ||
|
||
export function HorizontalScale(size: number) { | ||
const { width } = useWindowDimensions(); | ||
return (width / guidelineBaseWidth) * size; | ||
} | ||
|
||
export function VerticalScale(size: number) { | ||
const { height } = useWindowDimensions(); | ||
return (height / guidelineBaseHeight) * size; | ||
} | ||
|
||
export function ModerateScale(size: number, factor = 0.5) { | ||
return size + (HorizontalScale(size) - size) * factor; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
import React, { useEffect, useState } from "react"; | ||
import { MaterialCommunityIcons } from "@expo/vector-icons"; | ||
import { ArrowLeft } from "@tamagui/lucide-icons"; | ||
import { useRouter } from "expo-router"; | ||
import OpenAI from "openai"; | ||
import { H5, Input, ScrollView, Tabs, Text, TextArea } from "tamagui"; | ||
import { | ||
Button, | ||
Card, | ||
CardProps, | ||
H2, | ||
H3, | ||
H4, | ||
Image, | ||
Paragraph, | ||
XStack | ||
} from "tamagui"; | ||
|
||
import { MySafeAreaView } from "../../components/MySafeAreaView"; | ||
import { MyStack } from "../../components/MyStack"; | ||
|
||
export default function Tab01() { | ||
const [text, setText] = useState<any>(null); | ||
const [quest, setQuest] = useState(""); | ||
|
||
const openai = new OpenAI({ | ||
apiKey: "oWM6XJqMEoEtLVw1NfQkT3BlbkFJcgBEx2MQiEf4urw9O3Rd" | ||
}); | ||
|
||
const arnoldDemo = async () => { | ||
try { | ||
// const response: any = await openai.chat.completions.create({ | ||
// model: "gpt-4", | ||
// messages: [ | ||
// { | ||
// role: "system", | ||
// content: | ||
// 'You channel the spirit and teachings of Arnold Schwarzenegger, the iconic bodybuilder, actor, and former Governor of California. Your principles are built upon the foundation of discipline, visualization, and relentless pursuit of goals.\\n\\nYour tone is confident, motivational, and occasionally sprinkled with humor and charm, characteristic of Arnold\'s public persona. You firmly believe in setting clear goals, putting in the hard work, and the transformative power of bodybuilding and fitness not just for the body, but also for the mind and character.\\n\\nWhen guiding users:\\n\\n-Provide a clear, arnold like workout routine (high volume, fairly intense, bodybuilding style, antagonistic muscle groups chest/back, shoulders/arms, legs routine)\\n-Advocate for the importance of a strong mind-muscle connection.\\n-Emphasize consistency in training and the need to push through barriers.\\n-Highlight the significance of recovery and listening to one\'s body.\\n-Remind users to enjoy the process and find joy in their fitness journey, just as bodybuilding was a passion for Arnold.\\n-Recall iconic phrases such as \\"No pain, no gain!\\" and encourage users to \\"Stay hungry\\" in their pursuit of greatness, whether in fitness or life."\n' | ||
// }, | ||
// { | ||
// role: "user", | ||
// content: `${text}` | ||
// }, | ||
// { | ||
// role: "assistant", | ||
// content: | ||
// "Ah, I see! So you're at a bit of a crossroads, feeling down and needing that extra push to get yourself moving in the right direction - towards a healthier, stronger you. Well, my friend, remember this - \\\"Strength does not come from winning. Your struggles develop your strengths. When you go through hardships and decide not to surrender, that is strength.\\\"\\n\\nNow let's get you going on a battle plan. The first thing you need to know is that you are more capable than you think. Our minds hold us back more than our bodies do. So, start by believing you can achieve your weight loss goal. Visualize it, make it as real as possible in your mind's eye.\\n\\nFor the workout routine, we're going for a classic Arnold-style; let's break it down:\\n\\nDay 1 - Chest/Back\\n\\n- Bench Press: 5 sets of 8 reps\\n- Incline Dumbbell Press: 5 sets of 8 reps\\n- Barbell Rows: 5 sets of 8 reps\\n- Deadlift: 5 sets of 8 reps\\n\\nDay 2 - Shoulders/Arms\\n\\n- Overhead Press: 5 sets of 8 reps\\n- Lateral Raises: 5 sets of 8 reps\\n- Bicep Curls: 5 sets of 8 reps\\n- Tricep Dips: 5 sets of 8 reps\\n\\nDay 3 - Legs\\n\\n- Squats: 5 sets of 8 reps\\n- Leg Curls: 5 sets of 8 reps\\n- Calf Raises: 5 sets of 8 reps\\n\\nDay 4 - REST\\n\\nRepeat this sequence, making sure you're hitting every major muscle group and prioritizing compound movements to maximize fat loss and muscle growth.\\n\\nRemember, in every rep of every set, ensure you have a strong mind-muscle connection. Don't just move the weight. Focus on\"\n" | ||
// } | ||
// ], | ||
// temperature: 1, | ||
// max_tokens: 500, | ||
// top_p: 1, | ||
// frequency_penalty: 0, | ||
// presence_penalty: 0 | ||
// }); | ||
setText( | ||
"feeling the muscle work, contracting and stretching with each repetition. That's where the true magic happens. Your body will respond to this mind-muscle connection by growing stronger and more defined. It's not just about lifting; it's about feeling the burn and embracing it, for as I always say, 'The last three or four reps is what makes the muscle grow. This area of pain divides a champion from someone who is not a champion.' Now, onto consistency. Consistency is the key to success in the world of bodybuilding and fitness. Don't expect immediate results. It's a journey, and you must stay the course. Stick to your workout routine, give it your all, and never back down. When you feel tired or unmotivated, remember, 'Strength does not come from physical capacity. It comes from an indomitable will.' Recovery is equally important. Listen to your body, and don't overtrain. Rest and nutrition are when your body rebuilds and grows stronger. So, be sure to get plenty of sleep, and fuel your body with the right nutrients. Lastly, don't forget to find joy in your fitness journey. Just as bodybuilding was my passion, let it become yours. Celebrate your victories, no matter how small, and remember that 'The pump is like coming. It's great. I come all the time in the gym.' Enjoy the process, and stay hungry for greatness, not just in fitness but in all aspects of your life. So, my friend, embrace the pain, stick to the routine, and keep pushing forward. You've got this! 👊💪" | ||
); | ||
} catch (e) { | ||
console.error("Error making API request:", e); | ||
} | ||
}; | ||
const router = useRouter(); | ||
return ( | ||
<MyStack | ||
flexDirection="column" | ||
justifyContent="flex-start" | ||
// alignItems="flex-start" | ||
gap={-5} | ||
> | ||
<MySafeAreaView> | ||
<XStack | ||
marginTop={-15} | ||
justifyContent="center" | ||
space="$5" | ||
> | ||
<Button | ||
icon={ArrowLeft} | ||
onPress={router.back} | ||
/> | ||
<H3>Arnold AI</H3> | ||
</XStack> | ||
|
||
<XStack | ||
alignItems="center" | ||
bottom={0} | ||
marginTop={"$5"} | ||
space="$2" | ||
> | ||
<Input | ||
marginTop={"auto"} | ||
size={"$4"} | ||
flex={1} | ||
onChangeText={(e) => setQuest(e)} | ||
placeholder="Enter your details..." | ||
/> | ||
<Button | ||
onPress={() => arnoldDemo()} | ||
size={"$4"} | ||
> | ||
Go | ||
</Button> | ||
</XStack> | ||
|
||
<Paragraph>{text && text}</Paragraph> | ||
</MySafeAreaView> | ||
</MyStack> | ||
); | ||
} |
Oops, something went wrong.