Spaces:
Runtime error
Runtime error
Nathan Franklin
commited on
Commit
·
bd3e2e4
1
Parent(s):
a447e7a
add app skeleton and pip stuff
Browse files- Pipfile +13 -0
- app.py +41 -0
- requirements.txt +0 -0
Pipfile
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[[source]]
|
2 |
+
url = "https://pypi.org/simple"
|
3 |
+
verify_ssl = true
|
4 |
+
name = "pypi"
|
5 |
+
|
6 |
+
[packages]
|
7 |
+
gradio = "*"
|
8 |
+
|
9 |
+
[dev-packages]
|
10 |
+
|
11 |
+
[requires]
|
12 |
+
python_version = "3.11"
|
13 |
+
python_full_version = "3.11.9"
|
app.py
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def generate_response(correction_intensity,
|
4 |
+
language_level,
|
5 |
+
buddy_personality,
|
6 |
+
language_choice,
|
7 |
+
user_query
|
8 |
+
):
|
9 |
+
# Convert input audio to text
|
10 |
+
# Ask llm for response to text
|
11 |
+
# Convert llm response to audio
|
12 |
+
# Return converted llm response
|
13 |
+
return user_query
|
14 |
+
|
15 |
+
demo = gr.Interface(
|
16 |
+
fn=generate_response,
|
17 |
+
inputs=[
|
18 |
+
gr.Slider(
|
19 |
+
minimum=1,
|
20 |
+
maximum=5,
|
21 |
+
step=1,
|
22 |
+
label='Grammar Correction Intensity'
|
23 |
+
),
|
24 |
+
gr.Dropdown(
|
25 |
+
choices=['Beginner', 'Intermediate', 'Advanced'],
|
26 |
+
label='Language Level'),
|
27 |
+
gr.Dropdown(
|
28 |
+
choices=['Formal Teacher', 'Flirty Friend', 'Sarcastic Bro'],
|
29 |
+
label='Language Buddy Personality'),
|
30 |
+
gr.Dropdown(
|
31 |
+
choices=['English', 'Urdu', 'Japanese'],
|
32 |
+
label='Language Choice'),
|
33 |
+
gr.Audio(
|
34 |
+
sources=["microphone"],
|
35 |
+
)],
|
36 |
+
outputs=[
|
37 |
+
gr.Audio(label='User Query')
|
38 |
+
],
|
39 |
+
title="AI Language Buddy"
|
40 |
+
)
|
41 |
+
demo.launch()
|
requirements.txt
ADDED
File without changes
|