Donald Winkelman commited on
Commit
6127526
·
1 Parent(s): 15eca27

Fixing reload bug on first input

Browse files
.idea/Morpheme_Segmentation_Demo.iml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$" />
5
+ <orderEntry type="inheritedJdk" />
6
+ <orderEntry type="sourceFolder" forTests="false" />
7
+ </component>
8
+ </module>
.idea/active-tab-highlighter-v2.xml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ActiveTabHighlighterConfigurationV2">
4
+ <option name="enabled" value="true" />
5
+ <option name="background" value="#AD2E9C" />
6
+ </component>
7
+ </project>
.idea/gbrowser_project.xml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="GBrowserProjectService"><![CDATA[{
4
+ "tabs": [
5
+ {
6
+ "url": "https://dorkag.com/dorkag",
7
+ "createdAt": "2025-11-21T13:12:49Z"
8
+ }
9
+ ]
10
+ }]]></component>
11
+ </project>
.idea/git_toolbox_blame.xml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="GitToolBoxBlameSettings">
4
+ <option name="version" value="2" />
5
+ </component>
6
+ </project>
.idea/inspectionProfiles/Project_Default.xml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
+ <inspection_tool class="PyUnresolvedReferencesInspection" enabled="false" level="WARNING" enabled_by_default="false" />
6
+ </profile>
7
+ </component>
.idea/inspectionProfiles/profiles_settings.xml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ <component name="InspectionProjectProfileManager">
2
+ <settings>
3
+ <option name="USE_PROJECT_PROFILE" value="false" />
4
+ <version value="1.0" />
5
+ </settings>
6
+ </component>
.idea/misc.xml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Black">
4
+ <option name="sdkName" value="Python 3.13 (FreeScribe)" />
5
+ </component>
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.13 (FreeScribe)" project-jdk-type="Python SDK" />
7
+ </project>
.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/Morpheme_Segmentation_Demo.iml" filepath="$PROJECT_DIR$/.idea/Morpheme_Segmentation_Demo.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
app.py CHANGED
@@ -131,6 +131,7 @@ with gr.Blocks(title="MorphSeg Demo") as demo:
131
  lines=5,
132
  placeholder="Type word or sentence here...",
133
  label="Input Text"
 
134
  )
135
  with gr.TabItem("mb File Upload"):
136
  file_input = gr.File(
@@ -170,8 +171,8 @@ with gr.Blocks(title="MorphSeg Demo") as demo:
170
  )
171
 
172
  # Clear file input if text input is used, and vice versa (optional UX polish)
173
- txt_input.change(lambda: None, None, file_input)
174
- file_input.change(lambda: None, None, txt_input)
175
 
176
  gr.Markdown("### Examples")
177
  gr.Examples(
 
131
  lines=5,
132
  placeholder="Type word or sentence here...",
133
  label="Input Text"
134
+
135
  )
136
  with gr.TabItem("mb File Upload"):
137
  file_input = gr.File(
 
171
  )
172
 
173
  # Clear file input if text input is used, and vice versa (optional UX polish)
174
+ txt_input.change(lambda: None, outputs=[file_input])
175
+ file_input.change(lambda: None, outputs=[txt_input])
176
 
177
  gr.Markdown("### Examples")
178
  gr.Examples(